mirror of
https://github.com/beilunyang/moemail.git
synced 2026-09-05 07:16:39 +08:00
feat(turnstile): integrate Cloudflare Turnstile for enhanced security in login and registration processes
This commit is contained in:
@@ -2,6 +2,7 @@ import { LoginForm } from "@/components/auth/login-form"
|
||||
import { auth } from "@/lib/auth"
|
||||
import { redirect } from "next/navigation"
|
||||
import type { Locale } from "@/i18n/config"
|
||||
import { getTurnstileConfig } from "@/lib/turnstile"
|
||||
|
||||
export const runtime = "edge"
|
||||
|
||||
@@ -18,10 +19,11 @@ export default async function LoginPage({
|
||||
redirect(`/${locale}`)
|
||||
}
|
||||
|
||||
const turnstile = await getTurnstileConfig()
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-b from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800">
|
||||
<LoginForm />
|
||||
<LoginForm turnstile={{ enabled: turnstile.enabled, siteKey: turnstile.siteKey }} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user