The first commit, the core and all files is adding to repo

This commit is contained in:
2026-10-04 14:20:13 +05:00
commit 53d7b263c4
94 changed files with 10668 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { NextRequest, NextResponse } from "next/server";
import { authClient } from "@/lib/supabase";
export async function GET(request: NextRequest) {
const code = request.nextUrl.searchParams.get("code");
if (code) {
const client = await authClient();
const { error } = await client.auth.exchangeCodeForSession(code);
if (!error)
return NextResponse.redirect(new URL("/dashboard", request.url));
}
return NextResponse.redirect(new URL("/dashboard?auth=failed", request.url));
}