The nextjs api callback function of the SDK receives the request (which contains query params: code, state & auth0: [ ‘callback’ ]) but does not exchange the code for an access token (fails with 400 BadRequest ‘checks.state’ argument is missing). This only occurs when in production (I am using Netlify to deploy my NextJS web application) but not when using the localhost development enviroment. I checked all enviroment vars and they are the same for production and development (except URLs) and also verified that the auth0 app configuration (in dashboard) matches with the enviroment vars.
Same issue here. This has been working for me for about a month and all of a sudden I get this error now and all my client websites are down. No changes to the code…
I receive this error when trying to login via a github deployment preview url I get through Vercel. It works locally and in production but not on preview urls. I believe the issue to be related to my AUTH0_BASE_URL env variable along with the configuration in auth0.
For me, I would assume that the issue involves this env var being used for production on a preview url that isn’t the same domain but would love insight on to how this can be rectified.
For you others, my best advice would be to analyze the redirect_uri on the network request and confirm it is what it should be based on your specific environment as well as ensuring you have the correct env variable. I don’t know if that will help, just my guess based on my experience.
On our side we have encountered the same issue deploying on Netlify. We have tested to deploy on Vercel and in a Docker container an we don’t have the issue.
Do you think it something can be linked to Netlify?