Files
CatoandClaude 0b8e9246c6 feat(auth): every way in on AccountKit's own screens (#160)
Vita answers sign-in from AccountKit since today's switch (loki
accountkit-switch.yml). This moves the pages onto AccountKit's screens:
SignInForm, SignUpForm and the recovery form in de/en/fr, AccountPanel on
the profile. Password, passkey, a second factor; the email link and
recovery with mail; OrangeCat and the bitbaum sign-in when their env is set.

What stays Vita's: no delete button (medical records are kept ten years:
accountDeletion: false, and the panel leads to the erasure request); the
name on `users` (ownProfile); the per-account lockout, now a plugin on
AccountKit's sign-in; a new person's users row, profile and welcome
sequence; the role-aware landing. The runtime answers only with
AUTH_RUNTIME=accountkit and is unavailable elsewhere, so it never writes
accounts an import would refuse.

NextAuth, the bridge and Vita's own registration, forgot-, reset- and
change-password routes are gone; AccountKit is the only credential writer.
Production has no Google client and no Google links, so nobody loses a way in.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 22:44:00 +01:00

14 lines
607 B
TypeScript

import { signInMethods, type SignInMethods } from "@bitbaum/accountkit/auth";
import { sharedAuthMailer } from "./shared/runtime";
/**
* Which sign-in methods this deployment offers, from its env: password,
* passkeys and two-factor always; the email link and recovery when account
* mail works; OrangeCat with ORANGECAT_OAUTH_*; the shared bitbaum sign-in
* with SIGNIN_*. A method whose env is missing is hidden. Read per request:
* it is runtime env.
*/
export function vitaMethods(env: NodeJS.ProcessEnv = process.env): SignInMethods {
return signInMethods(env, sharedAuthMailer.configured);
}