Is there an equivalent of the v4 token.request
callback for OAuth2 providers in next-auth v5?
#13096
Unanswered
mike-axomic
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all, apologies if this has been asked before but I've been search around and unable to find an answer.
I've had issues integrating with a keycloak provider when using a keycloak client that uses jwt for client authentication instead of a client secret.
In v4 of next-auth I was able to get this working by using the
token.request
function to override the post to keycloak to include the correct params for jwt based client authentication. For example includingclient_assertion_type
andclient_assertion
to pass the params needed to convert acode
into atoken
as per OAuth spec when using this type of client authentication.Example for v4:
Ideally I want to migrate to next-auth v5, but
token.request
doesn't seem to be a thing there (no type errors, but just gets ignored and never called). Is there a different way to hook into thecode
->token
request to the provider in v5? Or failing that is there a different way to implement jwt based keycloak client authentication with v5?Many thanks!
Mike
Beta Was this translation helpful? Give feedback.
All reactions