Skip to content

Commit 1753672

Browse files
feat: Set auth cookie for subdomains
1 parent c4f9ba5 commit 1753672

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/api/auth/callback/route.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ export async function GET(req: Request) {
8484
const in1hour = addHours(new Date(), 1);
8585

8686
cookieStore.set('auth', token, {
87+
domain: process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL?.replace(
88+
'www.',
89+
'',
90+
),
91+
secure: true,
92+
sameSite: 'lax',
8793
expires: in1hour,
8894
});
8995

0 commit comments

Comments
 (0)