Help with custom OpenID Identity Provider - Implicit flow - Error when recieving JWT Bearer token #1421
Unanswered
MadsGosvig
asked this question in
Help
Replies: 1 comment 1 reply
-
So I would start with checking my possibilities and see if I could use authorization code with PKCE |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Your question
I have problems creating a custom provider that uses the implicit flow and OpenID.
What are you trying to do
Connect to a custom OpenID provider, and handle the JWT token it gives back.
The issues that I'm seeing is:
Reproduction
For now I have the following configuration:
My first issue was that the Identity Provider gave an error stating I needed the response_type & nonce in the URL, so I added that.
Next I get an error with state not being compared correctly:
Now - This works if I remove the parameters from the
authorizationUrl
but then the Identiy Provider complains...So I can obviously just set protection to
none
but that also feels like a cheat.Does anyone know why this could be happening? - I have compared with some of the other Providers, and they have something similar to my
authorizationUrl
But If I do that, to move forward I do indeed get the correct response from my Identity Provider, but next-auth doesn't handle it very well.
I end up on the following callback:
http://localhost:3000/api/auth/callback/[removed]#token_type=Bearer&access_token=eyJhbG.............&expires_in=3600&id_token=eyJhbGciOiJ...........&scope=agora%20openid&session_state=jh0KecWDjkaV1F9N%2BoseQVcU5jPbJ9F0xGgun61rxY0%3D.T0WILYQ%3D
But I recieve the following error from next-auth:
And I'm redirected twice to
http://localhost:3000/api/auth/error?error=Callback
http://localhost:3000/api/auth/signin?error=Callback
Can anyone spot any missing parts in my setup?
Feedback
Documentation refers to searching through online documentation, code comments and issue history. The example project refers to next-auth-example.
Beta Was this translation helpful? Give feedback.
All reactions