✨ types(auth): E-Mail-Faktor und maskierter Hinweis
- `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.
This commit is contained in:
1 parent
2546d05b25
commit
ba549a016b
1 file changed
+8
-1
Vendored
+8
-1
@@ -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<AdminAuthMethod, "pwd">
|
||||
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user