Added cookie name for app seperation
This commit is contained in:
@@ -36,7 +36,24 @@ export const options: AuthOptions = {
|
||||
strategy: "jwt",
|
||||
maxAge: 30 * 24 * 60 * 60,
|
||||
},
|
||||
|
||||
cookies: {
|
||||
sessionToken: {
|
||||
name: `${process.env.NEXTAUTH_COOKIE_PREFIX}-next-auth.session-token`, // Ändere den Namen für App 1
|
||||
options: {
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === "production",
|
||||
path: "/",
|
||||
},
|
||||
},
|
||||
csrfToken: {
|
||||
name: `${process.env.NEXTAUTH_COOKIE_PREFIX}-next-auth.csrf-token`,
|
||||
options: {
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === "production",
|
||||
path: "/",
|
||||
},
|
||||
},
|
||||
},
|
||||
adapter: PrismaAdapter(prisma as any),
|
||||
callbacks: {
|
||||
jwt: async ({ token, user }) => {
|
||||
|
||||
Reference in New Issue
Block a user