-
Notifications
You must be signed in to change notification settings - Fork 176
feat: add OpenID Connect (OIDC) provider #444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
9729859 to
909a33b
Compare
|
Hi @larsrickert ! Great work. |
That's already implemented :) |
Thanks for the quick reply! Could you point me to where this is implemented? I'm not seeing it in the PR code. Currently, it seems we only retrieve user info via the userinfo endpoint (which is optional), and the OidcTokens interface doesn't contain the idToken. Maybe I'm missing something? |
Maybe I misunderstood? As far a I saw during testing the user data is decoded in this server route which is used when redirecting from the oidc provider back to the Frontend. playground/server/routes/auth/oidc.ts |
Yes the user data is retrieved by sending the access token to the userinfo endpoint of the OIDC provider (thats already implemented). There is also a second way how the user data could be retrieved (e.g. because some providers do not offer a userinfo endpoint) and thats by requesting an idtoken (JWT with user data encoded in it) that is then validated and decoded. I'd suggest to aleady merge the OIDC provider as it is so its not blocked by another optional feature :) We can then extend it if needed in follow up PRs |
909a33b to
7e8792f
Compare
|
@randriese Thanks for your time reviewing the PR! Is there anything left in order to merge this PR? |
|
@larsrickert looks good to me! thanks for your efforts in bringing OIDC to the package! |
closes #25
closes #89
This PR adds support for a generic OpenID connect (OIDC) provider that can be used with any provider that supports the OIDC standard.
It supports the 'code' response type and grant type 'authorization_code'. If a client secret is provided, it will be used to fetch the token. Otherwise the PKCE flow will be used where no client secret is needed.
Since the existing PR #25 has not seen progress in almost two years, this PR is intended to replace #25.
Example usage