wip
This commit is contained in:
@@ -3,7 +3,6 @@ import { NextResponse } from 'next/server';
|
||||
|
||||
import { getAuthService } from '../../../../lib/auth';
|
||||
|
||||
const SESSION_COOKIE = 'gp_demo_session';
|
||||
const STATE_COOKIE = 'gp_demo_auth_state';
|
||||
|
||||
export async function GET(request: Request) {
|
||||
@@ -24,14 +23,7 @@ export async function GET(request: Request) {
|
||||
}
|
||||
|
||||
const authService = getAuthService();
|
||||
const session = await authService.loginWithIracingCallback({ code, state, returnTo });
|
||||
|
||||
cookieStore.set(SESSION_COOKIE, JSON.stringify(session), {
|
||||
httpOnly: true,
|
||||
sameSite: 'lax',
|
||||
path: '/',
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
});
|
||||
await authService.loginWithIracingCallback({ code, state, returnTo });
|
||||
|
||||
cookieStore.delete(STATE_COOKIE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user