import type { Metadata } from "next" import Link from "next/link" import { Logo } from "@/components/shared/logo" import { TurnstileWidget } from "@/components/shared/turnstile-widget" import { signIn, signInWithGoogle } from "@/app/actions/auth" export const metadata: Metadata = { title: "Sign in", robots: { index: false, follow: true }, } export default async function LoginPage({ searchParams, }: { searchParams: Promise<{ error?: string; success?: string; next?: string }> }) { const params = await searchParams const error = params.error const success = params.success const next = typeof params.next === "string" && params.next.startsWith("/") ? params.next : "" return (

Welcome back

Sign in to your account

{/* Google OAuth */}
or continue with email
{/* Error / Success messages */} {error && (
{decodeURIComponent(error)}
)} {success === "password-updated" && (
Password updated. Sign in below.
)} {/* Email + Password form */}
{next && }
Forgot password?

Don't have an account?{" "} Sign up free

) } function GoogleIcon() { return ( ) }