diff --git a/src/auth/server.ts b/src/auth/server.ts index 33758db2..d78762c9 100644 --- a/src/auth/server.ts +++ b/src/auth/server.ts @@ -8,6 +8,10 @@ export const { signOut, auth, } = NextAuth({ + // Non-Vercel platforms (e.g. EdgeOne) may not be auto-trusted by Auth.js. + // Enabling trustHost prevents auth route 500s caused by host validation. + trustHost: true, + secret: process.env.AUTH_SECRET, providers: [ Credentials({ async authorize({ email, password }) {