import { getSession, server } from "#/lib/zitadel"; import Alert from "#/ui/Alert"; import UserAvatar from "#/ui/UserAvatar"; import { getMostRecentCookieWithLoginname } from "#/utils/cookies"; export default async function Page({ searchParams, }: { searchParams: Record; }) { const { loginName } = searchParams; const sessionFactors = await loadSession(loginName); async function loadSession(loginName?: string) { const recent = await getMostRecentCookieWithLoginname(loginName); return getSession(server, recent.id, recent.token).then((response) => { if (response?.session) { return response.session; } }); } return (

Login with Passkey

Authenticate with your passkey device

{!sessionFactors && (
Could not get the context of the user. Make sure to enter the username first or provide a loginName as searchParam.
)} {sessionFactors && ( )}
); }