mirror of
https://github.com/bitbaum/vitareba.git
synced 2026-12-04 05:37:46 +01:00
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>
14 lines
607 B
TypeScript
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);
|
|
}
|