Skip to content

feat: OIDC support for jwks#497

Open
hareland wants to merge 2 commits intoatinux:mainfrom
hareland:feat/oidc-jwks
Open

feat: OIDC support for jwks#497
hareland wants to merge 2 commits intoatinux:mainfrom
hareland:feat/oidc-jwks

Conversation

@hareland
Copy link

@hareland hareland commented Feb 2, 2026

This PR aims to add support for using JWKS to verify the token if provided in config or OIDC endpoint..

let user = {} as TUser

// some OIDC providers do not support a userinfo endpoint so we only call it when its defined inside the OIDC config
if (oidcConfig.userinfo_endpoint) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since not all OIDC providers support the /userinfo endpoint, this should probably be inferred from the ID Token IF it is verified?

@hareland hareland changed the title feat: add support for jwks feat: OIDC support for jwks Feb 2, 2026
@larsrickert
Copy link
Contributor

Hey, one question regarding the aim of this PR:
Why do you want to very the same token that you have just received from the IDP (when logging in) with the exact same IDP?

Example: You login via GitHub and get the tokens in the response from GitHub. With the changes in this PR, we would immediately verify / ask GitHub again "Are these tokens valid?"
Since we just received them, do you have any specific use case in mind why this is needed?

@hareland
Copy link
Author

hareland commented Feb 4, 2026

Hi @larsrickert, the purpose is to independently verify the signature of the JWT using the provider's public key.

As it stands now, this will only verify the signature IF there is JWKS defined in the .openid-configuration, this could be a different server.

FYI: This PR is not complete, and i am looking for input so any suggestions are more than welcome ❤️


Edit: This should probably be an opt-in feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants