feat(app): admin and catalogue entries, step-up guard, MFA in Mon compte (V1-2.5 E, F)
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.
This commit is contained in:
1 parent
99488d71d9
commit
4744e28986
38 files changed
+1818
-55
No files matched your search
@@ -19,6 +19,7 @@ export type AuthFailureKind =
|
||||
| 'link_expired'
|
||||
| 'session_expired'
|
||||
| 'reauthentication_needed'
|
||||
| 'aal2_required'
|
||||
| 'provider_disabled'
|
||||
| 'network'
|
||||
| 'unknown'
|
||||
@@ -52,6 +53,8 @@ const CODE_TO_KIND: Record<string, AuthFailureKind> = {
|
||||
refresh_token_not_found: 'session_expired',
|
||||
reauthentication_needed: 'reauthentication_needed',
|
||||
reauthentication_not_valid: 'reauthentication_needed',
|
||||
// A password change with a verified factor needs an aal2 session (IDENTITY.md §4.1).
|
||||
insufficient_aal: 'aal2_required',
|
||||
provider_disabled: 'provider_disabled',
|
||||
oauth_provider_not_supported: 'provider_disabled',
|
||||
email_provider_disabled: 'provider_disabled',
|
||||
|
||||
@@ -14,6 +14,7 @@ describe('classifyAuthError', () => {
|
||||
expect(classifyAuthError(err({ code: 'weak_password', status: 422 }))).toBe('weak_password')
|
||||
expect(classifyAuthError(err({ code: 'otp_expired', status: 403 }))).toBe('link_expired')
|
||||
expect(classifyAuthError(err({ code: 'bad_code_verifier', status: 400 }))).toBe('link_expired')
|
||||
expect(classifyAuthError(err({ code: 'insufficient_aal', status: 401 }))).toBe('aal2_required')
|
||||
})
|
||||
|
||||
it('falls back on the HTTP status, then network, then unknown', () => {
|
||||
|
||||
Reference in new issue
Block a user