Skip to content

Cann't login in #552

@xiaoqufengdi

Description

@xiaoqufengdi

The project cannot log in after being deployed to Vercel, but it works fine in the local development environment.
It reported an error.

parsedCredentials {
success: true,
data: { email: 'user@nextmail.com', password: '123456' }
}
Failed to fetch user: s [VercelPostgresError]: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.
at c (/var/task/.next/server/chunks/782.js:365:14429)
at Object.apply (/var/task/.next/server/chunks/782.js:365:15599)
at d (/var/task/.next/server/app/login/page.js:6:2355)
at Object.authorize (/var/task/.next/server/app/login/page.js:6:2783)
at Object.l (/var/task/.next/server/chunks/782.js:31:23411)
at c (/var/task/.next/server/chunks/782.js:31:36995)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async c (/var/task/.next/server/chunks/782.js:31:16530)
at async a (/var/task/.next/server/chunks/782.js:365:61225)
at async h (/var/task/.next/server/app/login/page.js:6:456) {
code: 'missing_connection_string'
}
�[31m[auth][error]�[0m CallbackRouteError: Read more at https://errors.authjs.dev#callbackrouteerror
�[31m[auth][cause]�[0m: Error: Failed to fetch user.
at d (/var/task/.next/server/app/login/page.js:6:2467)
at Object.authorize (/var/task/.next/server/app/login/page.js:6:2783)
at Object.l (/var/task/.next/server/chunks/782.js:31:23411)
at c (/var/task/.next/server/chunks/782.js:31:36995)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async c (/var/task/.next/server/chunks/782.js:31:16530)
at async a (/var/task/.next/server/chunks/782.js:365:61225)
at async h (/var/task/.next/server/app/login/page.js:6:456)
at async /var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:489
at async rc (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:14:5137)
�[31m[auth][details]�[0m: {
"provider": "credentials"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions