Next.js/Vercel - CallbackHandlerError: Callback handler failed. CAUSE: Missing state cookie from login request (check login URL, callback URL and cookie config)

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?

Hey team!

This topic seems related to the new Auth0 Integration available new in Vercel Marketplace. This is the first version of this integration, and we welcome your feedback to improve future iterations.

You’ll need an existing Vercel project to use the new integration to build and customize the Identity flow. You can either import your project into Vercel or use a Vercel template so you don’t have to start from scratch like our SaaStart template to deploy a production-ready B2B SaaS app in minutes (learn more here).

If you find yourself having questions regarding this new integration for the next two weeks, we are hosting an Ask Me Anything session. Our Product Expert will provide comprehensive written answers on August 8th from 8 AM to 10 AM PST.

Find out more about Auth0 Integration and learn more about AMA.

Thanks!
Dawid