import type { Metadata } from 'next'; import { redirect } from 'next/navigation'; import { LogoMark } from '@/components/brand/logo'; import { Container } from '@/components/ui/section'; import { isAdmin, safeNextPath } from '@/lib/admin-auth'; export const metadata: Metadata = { title: 'Sign in', robots: { index: false, follow: false } }; export default async function AdminLoginPage({ searchParams }: { searchParams: Promise<{ error?: string; next?: string }> }) { const sp = await searchParams; const next = safeNextPath(sp.next); if (await isAdmin()) redirect(next); const error = sp.error === 'invalid' ? 'That token is not valid.' : sp.error === 'unconfigured' ? 'SI_ADMIN_TOKEN is not configured on the server — the admin is disabled.' : null; return (

SatelliteIndex admin

Sign in

Paste the operator token. It is verified on the server and never stored in the browser — only a hashed session cookie is set.

{error && (

{error}

)}
); }