I use auth0 with a Next.js application deployed on Vercel. After redeploying my application in Vercel (no code changes) I began getting the following error for all users after logging out and trying to log back in:
CallbackHandlerError: Callback handler failed. CAUSE: Missing state cookie from login request (check login URL, callback URL and cookie config).
at CallbackHandlerError.AuthError [as constructor] (/var/task/node_modules/@auth0/nextjs-auth0/dist/utils/errors.js:34:16)
at CallbackHandlerError.HandlerError [as constructor] (/var/task/node_modules/@auth0/nextjs-auth0/dist/utils/errors.js:110:23)
at new CallbackHandlerError (/var/task/node_modules/@auth0/nextjs-auth0/dist/utils/errors.js:138:28)
at /var/task/node_modules/@auth0/nextjs-auth0/dist/handlers/callback.js:42:31
at step (/var/task/node_modules/tslib/tslib.js:144:27)
at Object.throw (/var/task/node_modules/tslib/tslib.js:125:57)
at rejected (/var/task/node_modules/tslib/tslib.js:116:69)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_CALLBACK_HANDLER_FAILURE',
cause: MissingStateCookieError: Missing state cookie from login request (check login URL, callback URL and cookie config).
at new MissingStateCookieError (/var/task/node_modules/@auth0/nextjs-auth0/dist/auth0-session/utils/errors.js:39:16)
at /var/task/node_modules/@auth0/nextjs-auth0/dist/auth0-session/handlers/callback.js:30:63
at step (/var/task/node_modules/tslib/tslib.js:144:27)
at Object.next (/var/task/node_modules/tslib/tslib.js:125:57)
at fulfilled (/var/task/node_modules/tslib/tslib.js:115:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
expose: true,
statusCode: 400,
status: 400
},
status: 400
}
I redeployed the same commit 8 days ago and it was working then. Any ideas on how to solve/further debug this issue?