We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 461667d commit 916bc1aCopy full SHA for 916bc1a
app/auth/callback/route.ts
@@ -29,6 +29,14 @@ export async function GET(request: NextRequest) {
29
if (error) {
30
return NextResponse.redirect(new URL('/login?error=oauth', request.url))
31
}
32
+
33
+ // Collect all cookies and set them on the response
34
+ const allCookies = cookieStore.getAll();
35
+ const response = NextResponse.redirect(new URL('/', request.url));
36
+ for (const cookie of allCookies) {
37
+ response.cookies.set(cookie.name, cookie.value, cookie);
38
+ }
39
+ return response;
40
41
42
// Always redirect to the main app after successful authentication
0 commit comments