RPError: state missing from the response
when setting a custom Sketchfab provider
#7221
Replies: 2 comments
-
I can confirm the problem must lie somewhere on Next Auth's side (or a gap in the documentation that I'm unable to identify). I managed to successfully complete the flow using https://www.npmjs.com/package/react-simple-oauth2-login |
Beta Was this translation helpful? Give feedback.
0 replies
-
I switched to use PKCE and that is working fine, therefore I don't need a solution to this anymore. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm implementing an OAuth 2.0 flow using Sketchfab's implicit grant type via a custom provider.
It's a simple setup at the moment. Just the signing page at the root of the domain with a button for
signin()
. I'm using Next.js13.2.4
and Next Auth4.21.1
.The issue I have is that it throws an error on the final stage, after being kicked back to my app from Sketchfab. I'm hosting with Vercel and this is the server's error log after enabling Next Auth's
debug
option:For the sign in page, Vercel's log is the following:
Domain aside, the error's page URL is as follows
/api/auth/signin?error=OAuthCallback#access_token=qi7L2kbPCcm68sYsvZ8ZAIiG7h16NS&expires_in=2592000&token_type=Bearer&scope=read&state=S39Mph8lxdZzE2O7AraydXa3mMdCduJfOXkX8F5Fr6g
So it looks like
state
is indeed present (&state=S39Mph8lxdZzE2O7AraydXa3mMdCduJfOXkX8F5Fr6g
).[...nextauth].ts
is as follows:Any pointers regarding where this is failing would be really helpful, I've ran out of options too look into. Maybe I'm missing something obvious but I haven't been able to find working fully working examples of custom providers.
Beta Was this translation helpful? Give feedback.
All reactions