fp/services/next/app/callback/route.ts

11 lines
358 B
TypeScript
Raw Permalink Normal View History

2024-11-05 19:48:21 +00:00
import { handleSignIn } from '@logto/next/server-actions';
import { redirect } from 'next/navigation';
import { NextRequest } from 'next/server';
import { logtoConfig } from '../logto';
export async function GET(request: NextRequest) {
const searchParams = request.nextUrl.searchParams;
await handleSignIn(logtoConfig, searchParams);
redirect('/');
}