Skip to content

Commit

Permalink
Updated route to get secure next-auth cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
xKhronoz committed Apr 9, 2024
1 parent d5e0a0f commit 4e993e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/app/api/profile/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(request: NextRequest) {
const { pathname, origin } = request.nextUrl;
const signinPage = new URL('/sign-in', origin);
// Retrieve the session token from the request cookies
const session = request.cookies.get('next-auth.session-token');
const session = request.cookies.get('next-auth.session-token') || request.cookies.get('__Secure-next-auth.session-token');

// Create a new Supabase client
const supabase = createClient(
Expand Down

0 comments on commit 4e993e0

Please sign in to comment.