Add authenticated login and SSO protection
This commit is contained in:
11
app/api/auth/callback/route.ts
Normal file
11
app/api/auth/callback/route.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { completeAuthorizationCallback, redirectToLoginWithError } from "@/lib/server/auth/oauth";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
try {
|
||||
return await completeAuthorizationCallback(request);
|
||||
} catch {
|
||||
return redirectToLoginWithError(request, "callback_failed");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user