Please include the following information in your post:
- Which SDK this is regarding: @auth0/nextjs-auth0
- SDK Version: 1.3.0
- Platform Version: next: 10.1.3, Node: 15.13.0
Code Snippets/Error Messages/Supporting Details/Screenshots:
BadRequest: checks.state argument is missing after login
After successfully login in via Google or Github (as shown in auth0 logs):
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.