feat(auth): make passkey two-factor authentication opt-in (#2857)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-20 05:06:50 +02:00
1 parent 3256af8d92
commit ba7d8781cf
94 files changed
+7322 -2747

No files matched your search

@@ -6,9 +6,10 @@ import {ForbiddenError} from '@fluxer/errors/src/domains/core/ForbiddenError';
export interface SudoModeMethods {
totp: boolean;
webauthn: boolean;
backup_codes: boolean;
}
const EMPTY_METHODS: SudoModeMethods = {totp: false, webauthn: false};
const EMPTY_METHODS: SudoModeMethods = {totp: false, webauthn: false, backup_codes: false};
export class SudoModeRequiredError extends ForbiddenError {
constructor(hasMfa: boolean, methods: SudoModeMethods = EMPTY_METHODS) {