feat: add passkey-based two-factor authentication

This commit is contained in:
shuaiplus
2026-07-05 14:51:11 +08:00
parent f63b745d05
commit c019c93726
31 changed files with 1540 additions and 116 deletions
+11
View File
@@ -907,6 +907,7 @@ export function createDemoMainRoutesProps(base: AppMainRoutesProps, notify: Noti
adminLoading: false,
adminError: '',
totpEnabled: true,
passkey2faEnabled: false,
authorizedDevices: state.authorizedDevices,
authorizedDevicesLoading: false,
authorizedDevicesError: '',
@@ -1060,6 +1061,16 @@ export function createDemoMainRoutesProps(base: AppMainRoutesProps, notify: Noti
onSavePasswordHint: readonly,
onEnableTotp: readonly,
onOpenDisableTotp: readonlyVoid,
onGetTwoFactorPasskeySettings: async () => ({ enabled: false, keys: [] }),
onCreateTwoFactorPasskey: async () => {
await readonly();
return { enabled: false, keys: [] };
},
onDeleteTwoFactorPasskey: async () => {
await readonly();
return { enabled: false, keys: [] };
},
onDisableTwoFactorPasskeys: readonly,
onGetRecoveryCode: readonlyString,
onGetApiKey: readonlyString,
onRotateApiKey: readonlyString,