Nav hint from own grants and roles (never a control); RequireCatalog, RequireAdmin (no admin read before aal2), Accès non autorisé page, placeholder routes; TOTP factor list, enrolment with QR and one-time secret, removal, inline step-up for aal2 actions, step-up in password reset; auth kind aal2_required. App 601, e2e:ui 227.
9 lines
344 B
TypeScript
9 lines
344 B
TypeScript
import { classifyMfaError } from '@faunosteo/supabase'
|
|
import { useT } from '@/i18n/useT'
|
|
|
|
/** One sentence per MFA failure kind (`mfa.failure.<kind>`); GoTrue's own message never shows. */
|
|
export function useMfaFailureMessage(): (error: unknown) => string {
|
|
const t = useT()
|
|
return (error) => t(`mfa.failure.${classifyMfaError(error)}`)
|
|
}
|