...
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-12-11 21:36:45 +08:00
parent 65aacc1582
commit b69e168558
41 changed files with 763 additions and 189 deletions

20
src/app/auth/page.tsx Normal file
View File

@@ -0,0 +1,20 @@
import { auth } from "@/auth";
import { headers } from "next/headers";
import { redirect } from "next/navigation";
import AuthForm from "./AuthForm";
export default async function AuthPage(
props: {
searchParams: Promise<{ [key: string]: string | string[] | undefined; }>
}
) {
const searchParams = await props.searchParams;
const redirectTo = searchParams.redirect as string | undefined;
const session = await auth.api.getSession({ headers: await headers() });
if (session) {
redirect(redirectTo || '/');
}
return <AuthForm redirectTo={redirectTo} />;
}