fix: use static auth cookie name to sync session across browser and server contexts
All checks were successful
Staging Build / build (push) Successful in 1m56s
All checks were successful
Staging Build / build (push) Successful in 1m56s
This commit is contained in:
@@ -25,6 +25,9 @@ export async function POST(request: Request) {
|
||||
}
|
||||
},
|
||||
},
|
||||
cookieOptions: {
|
||||
name: "webshop-auth-token",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ export async function GET() {
|
||||
}
|
||||
},
|
||||
},
|
||||
cookieOptions: {
|
||||
name: "webshop-auth-token",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -65,6 +68,9 @@ export async function POST(request: Request) {
|
||||
}
|
||||
},
|
||||
},
|
||||
cookieOptions: {
|
||||
name: "webshop-auth-token",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -8,5 +8,10 @@ export function createClient() {
|
||||
return createBrowserClient(
|
||||
resolveSupabaseUrl(supabaseUrl)!,
|
||||
supabaseAnonKey!,
|
||||
{
|
||||
cookieOptions: {
|
||||
name: "webshop-auth-token",
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,9 @@ export async function updateSession(request: NextRequest) {
|
||||
);
|
||||
},
|
||||
},
|
||||
cookieOptions: {
|
||||
name: "webshop-auth-token",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@ export async function createClient() {
|
||||
}
|
||||
},
|
||||
},
|
||||
cookieOptions: {
|
||||
name: "webshop-auth-token",
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user