import type { Metadata } from 'next'; import Link from 'next/link'; import { redirect } from 'next/navigation'; import { env } from 'next-runtime-env'; import { IS_GOOGLE_SSO_ENABLED } from '@documenso/lib/constants/auth'; import { decryptSecondaryData } from '@documenso/lib/server-only/crypto/decrypt'; import { SignInForm } from '~/components/forms/signin'; export const metadata: Metadata = { title: 'Sign In', }; type SignInPageProps = { searchParams: { email?: string; }; }; export default function SignInPage({ searchParams }: SignInPageProps) { const NEXT_PUBLIC_DISABLE_SIGNUP = env('NEXT_PUBLIC_DISABLE_SIGNUP'); const rawEmail = typeof searchParams.email === 'string' ? searchParams.email : undefined; const email = rawEmail ? decryptSecondaryData(rawEmail) : null; if (!email && rawEmail) { redirect('/signin'); } return (

Sign in to your account

Welcome back, we are lucky to have you.

{NEXT_PUBLIC_DISABLE_SIGNUP !== 'true' && (

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

)}

Forgot your password?

); }