I recently deployed my Next app-router app to Vercel. For some reason, I get an error returned in the auth callback. It works fine locally. I tried logging into an existing account and creating a new one, both fail.
I’ve been following the instructions here:
a [CallbackHandlerError]: Callback handler failed. CAUSE: access_denied (Unauthorized)
at /var/task/.next/server/chunks/99.js:1:39181
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /var/task/.next/server/chunks/99.js:1:36639
... 4 lines matching cause stack trace ...
at async en.responseCache.get.routeKind (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:1026)
at async r6.renderToResponseWithComponentsImpl (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:508)
at async r6.renderPageComponent (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:5121) {
code: 'ERR_CALLBACK_HANDLER_FAILURE',
cause: o [Error]: access_denied (Unauthorized)
at h.callback (/var/task/.next/server/chunks/99.js:1:3769)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /var/task/.next/server/chunks/99.js:1:13387
at async /var/task/.next/server/chunks/99.js:1:39131
at async /var/task/.next/server/chunks/99.js:1:36639
at async /var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:36258
at async eR.execute (/var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:26874)
at async eR.handle (/var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:37512)
at async es (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:16:25465)
at async en.responseCache.get.routeKind (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:1026) {
error: 'access_denied',
errorDescription: 'Unauthorized',
status: 400,
statusCode: 400,
openIdState: { returnTo: 'https://aa-next.vercel.app/' }
},
status: 400
}