"use client"; import { KeyRound } from "lucide-react"; import { useActionState } from "react"; import { LogoMark } from "@/components/brand/logo"; import { Button } from "@/components/ui"; import { loginAction, type LoginState } from "@/app/admin/login/actions"; export function LoginForm({ next, reason }: { next: string; reason?: string }) { const [state, action, pending] = useActionState(loginAction, {}); return (
DataCenterIndex · Admin
Operations console
{reason === "expired" && !state.error &&

Your session expired or the token was rejected. Sign in again.

} {reason === "logged-out" && !state.error &&

Signed out.

} {state.error && (

{state.error}

)}

The token is verified against the API and kept in an httpOnly cookie for 12 hours. It is never sent to the browser bundle.

); }