peppa/apps/web/app/login/page.tsx
Асель 57d7857d94 PEP-71: login only through eGov, unknown IIN registers an account
Gitea and password login are gone from the web; the first eGov login creates a
Peppa account (login from the certificate name). Projects of self-registered
owners run agents only on a subscription pool, never on the machine login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:57:02 +05:00

27 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { redirect } from "next/navigation";
import { currentUser, safeNext } from "@/lib/auth";
import { Brand } from "@/components/Brand";
import { Flash } from "@/components/common";
import { EgovSign } from "@/components/EgovSign";
import { Footer } from "@/components/Footer";
export const dynamic = "force-dynamic";
/** PEP-71: eGov QR is the only way in; the first login registers the account. */
export default async function Login({ searchParams }: { searchParams: Promise<{ error?: string; next?: string }> }) {
const { error, next } = await searchParams;
if (await currentUser()) redirect(safeNext(next));
return (
<main className="grid min-h-dvh place-items-center px-4">
<div className="flex w-full max-w-sm flex-col items-center gap-5 text-center">
<Brand large />
<p className="m-0 text-sm text-muted-foreground">Софтвейр-фабрика: проекты в Gitea, стори по OpenSpec, агенты Claude Code и Codex.</p>
<Flash error={error} />
<EgovSign purpose="login" next={safeNext(next)} label="Войти через eGov" />
<p className="m-0 text-xs text-muted-foreground">Первый вход сразу создаёт учётку по вашему ИИН. С телефона — кнопка «Открыть в eGov Mobile».</p>
<Footer />
</div>
</main>
);
}