Skip to content

[Bug]: Okta OIDC integration would return jwks 404 #8051

Open
@Colstuwjx

Description

@Colstuwjx

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (Language Policy).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

09f8dfe

RAGFlow image version

/

Other environment information

macOS M1 Prod, started the web service from source

Actual behavior

Try to login with okta and error returned:

Traceback (most recent call last):
  File "/Users/user/Projects/ragflow/api/apps/auth/oidc.py", line 73, in parse_id_token
    signing_key = jwks_cli.get_signing_key_from_jwt(id_token).key
  File "/opt/homebrew/anaconda3/envs/ragflow-local/lib/python3.10/site-packages/jwt/jwks_client.py", line 113, in get_signing_key_from_jwt
    return self.get_signing_key(header.get("kid"))
  File "/opt/homebrew/anaconda3/envs/ragflow-local/lib/python3.10/site-packages/jwt/jwks_client.py", line 95, in get_signing_key
    signing_keys = self.get_signing_keys()
  File "/opt/homebrew/anaconda3/envs/ragflow-local/lib/python3.10/site-packages/jwt/jwks_client.py", line 82, in get_signing_keys
    jwk_set = self.get_jwk_set(refresh)
  File "/opt/homebrew/anaconda3/envs/ragflow-local/lib/python3.10/site-packages/jwt/jwks_client.py", line 74, in get_jwk_set
    data = self.fetch_data()
  File "/opt/homebrew/anaconda3/envs/ragflow-local/lib/python3.10/site-packages/jwt/jwks_client.py", line 59, in fetch_data
    raise PyJWKClientConnectionError(
jwt.exceptions.PyJWKClientConnectionError: Fail to fetch data from the url, err: "HTTP Error 404: Not Found"
2025-06-04 14:03:08,468 ERROR    58577 Error parsing ID Token: Fail to fetch data from the url, err: "HTTP Error 404: Not Found"

Expected behavior

Could be able to login with okta channel

Steps to reproduce

1. start the service on local from source;
2. set configs in yaml:


...
oauth:
  oidc:
    display_name: "Okta OIDC"
    client_id: "xxx"
    client_secret: "xxx"
    issuer: "https://YOU_OKTA_DOMAIN.okta.com/oauth2/default"
    authorization_url: "https://YOU_OKTA_DOMAIN.okta.com/oauth2/default/v1/authorize"
    token_url: "https://YOU_OKTA_DOMAIN.okta.com/oauth2/default/v1/token"
    userinfo_url: "https://YOU_OKTA_DOMAIN.okta.com/oauth2/default/v1/userinfo"
    scope: "openid email profile"
    redirect_uri: "http://localhost/v1/user/oauth/callback/oidc"

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working, pull request that fix bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions