Replies: 1 comment 1 reply
-
I managed to get it to work by adding
Now accessToken should be populated. Does that happen to you too? |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I am working on an implementation where I have a site using next-auth which needs to interact with an external API.
Both the SPA and API have applications created in auth0 and i've connected them according to the guide here. The problem i'm running into is next-auth doesn't seem to be fetching an access token.
In particular this section is where i'm getting stuck.
My next-auth config:
Some of the things I tried:
response_type: 'token id_token'
to the authorization params (this failed and auth0 complained about a missing nonce)state missing from the response
. I did some research on this error, but couldn't figure out what was going wrong.Once I added the nonce, I was able to auth with auth0 (it returned an access token in the url), but the error page was shown due to the aforementioned state problem. I manually tested this token by calling my protected API and it does work, so I need to figure out what i've misconfigured to avoid the error page.
Is there something obviously wrong here? Most of the similar issues or examples online seem to get the access token back from the start and that doesn't seem to be happening for me.
Any help is appreciated, thank you!
Beta Was this translation helpful? Give feedback.
All reactions