feat: add local auth billing and usage management
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
import { completeAuthorizationCallback, redirectToLoginWithError } from "@/lib/server/auth/oauth";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
try {
|
||||
return await completeAuthorizationCallback(request);
|
||||
} catch {
|
||||
return redirectToLoginWithError(request, "callback_failed");
|
||||
}
|
||||
return NextResponse.redirect(new URL("/auth/login?error=callback_failed", request.url));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user