From ba549a016b8766cc601e3e44ed0a6bb0ef2cbd38 Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Fri, 6 Nov 2026 19:33:11 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20types(auth):=20E-Mail-Faktor=20und?= =?UTF-8?q?=20maskierter=20Hinweis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `AdminAuthMethod`/`AdminMfaMethod` enthalten jetzt `email`. - `AdminMfaStatus` um `emailEnabled`, `email` (maskiert), `emailVerified` erweitert. - `AdminMfaChallenge.emailHint` für die maskierte Adresse, wenn der Faktor angeboten wird. - Type-Test deckt die neue Methode und den Status ab. --- index.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 6b41b1c..2e6af15 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2486,7 +2486,7 @@ declare global { // admin UI and any client use the same contract as the server. /** Every method that can appear in the `amr` claim, including the password. */ - export type AdminAuthMethod = "pwd" | "totp" | "recovery" | "webauthn" + export type AdminAuthMethod = "pwd" | "totp" | "recovery" | "email" | "webauthn" /** Factors the login offer can contain (no password). */ export type AdminMfaMethod = Exclude @@ -2499,6 +2499,8 @@ declare global { /** Policy requires a factor and the grace period is over. */ enrollmentRequired?: boolean methods: AdminMfaMethod[] + /** Masked address when the e-mail factor is one of the methods. */ + emailHint?: string } /** Step-1 answer for an account without an active factor. */ @@ -2516,6 +2518,11 @@ declare global { export interface AdminMfaStatus { totpEnabled: boolean webauthnCredentials: number + /** The e-mail code factor is explicit opt-in and never enabled automatically. */ + emailEnabled: boolean + /** Masked verified address, e.g. `a***@example.com`. */ + email?: string + emailVerified: boolean recoveryCodesRemaining: number enforced: boolean policy: "off" | "optional" | "required"