import { createFileRoute } from '@tanstack/react-router'; import { AlertCircle } from 'lucide-react'; import { z } from 'zod'; import { Or } from '@/components/auth/or'; import { SignInEmailForm } from '@/components/auth/sign-in-email-form'; import { SignInGithub } from '@/components/auth/sign-in-github'; import { SignInGoogle } from '@/components/auth/sign-in-google'; import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; import { useCookieStore } from '@/hooks/use-cookie-store'; import { createTitle, PAGE_TITLES } from '@/utils/title'; export const Route = createFileRoute('/_login/login')({ component: LoginPage, head: () => ({ meta: [ { title: createTitle(PAGE_TITLES.LOGIN) }, { name: 'robots', content: 'noindex, follow' }, ], }), validateSearch: z.object({ error: z.string().optional(), correlationId: z.string().optional(), }), }); function LoginPage() { const { error, correlationId } = Route.useSearch(); const [lastProvider] = useCookieStore( 'last-auth-provider', null ); return (

Sign in

Don't have an account?{' '} Create one today

{error && ( Error

{error}

{correlationId && ( <>

Correlation ID: {correlationId}

Contact us if you have any issues.{' '} hello[at]openpanel.dev

)}
)}
); }