11 lines
358 B
TypeScript
11 lines
358 B
TypeScript
|
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('/');
|
||
|
}
|