-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat(core): support private_key_jwt
token auth method
#11132
feat(core): support private_key_jwt
token auth method
#11132
Conversation
…in a custom provider.
…tOptions.clientPrivateKey` property and pass it into the oauth4webapi.authorizationCodeGrantRequest method if `client.token_endpoint_auth_method === "private_key_jwt"`
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@leemcmullen is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
@ThangHuuVu Hey! 👋 It seems like you've been allocated as the reviewer for my PR. Just wondered what the expectation in terms of timescales to get a review is likely to be? Thanks, Lee 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Please check my comments.
private_key_jwt
token auth method
… Also update `normalizeEndpoint` to ensure the `clientPrivateKey` persists prior to the callback being invoked.
… to align with oauth4webapi
…hub.com:leemcmullen/next-auth into fix/pass-private-key-when-using-private_key_jwt
…perty if it exists on the incoming object.
@balazsorban44 Awesome, thanks for the comments! I've resolved them all and had to make another tweak as a result of moving |
☕️ Reasoning
Currently there are 2 issues with NextAuth when attempting to use
token_endpoint_auth_method: "private_key_jwt"
:1 - There is nowhere to actually configure/use a private key which is required for this type of auth
2 - NextAuth currently does not pass the
options.clientPrivateKey
paramater into the underlying oauth4web libraryThis PR addresses both of those issues. So an example provider would end up looking like this: