fix: 500 auth error on vercel
Deploy to Vercel / Deploy to Vercel (push) Successful in 7m16s

This commit is contained in:
2026-06-18 15:57:39 -03:00
parent b2cd2acd9c
commit 1b5b2431b3
2 changed files with 9 additions and 1 deletions
+3
View File
@@ -4,6 +4,9 @@ export const authConfig = {
pages: {
signIn: "/login",
},
trustHost:
process.env.NODE_ENV === "development" ||
process.env.NEXTAUTH_URL === "https://black-espresso-eventme.vercel.app",
session: {
strategy: "jwt",
},
+6 -1
View File
@@ -1,7 +1,12 @@
import NextAuth from "next-auth";
import { authConfig } from "./auth.config";
export const { auth } = NextAuth(authConfig);
export const { auth } = NextAuth({
...authConfig,
trustHost:
process.env.NODE_ENV === "development" ||
process.env.NEXTAUTH_URL === "https://black-espresso-eventme.vercel.app",
});
export default auth((req) => {
const isLoggedIn = !!req.auth;