feat: add 2FA recovery codes regeneration and backup functionality, enhancing account security

This commit is contained in:
Usman Baig
2026-02-23 11:43:57 +01:00
parent b54af6c03a
commit 27b3aa8380
4 changed files with 11 additions and 6 deletions

View File

@@ -34,8 +34,9 @@ export async function disable2FA(passwordDerived: string): Promise<void> {
})
}
export async function regenerateRecoveryCodes(): Promise<RegenerateCodesResponse> {
export async function regenerateRecoveryCodes(passwordDerived: string): Promise<RegenerateCodesResponse> {
return apiRequest<RegenerateCodesResponse>('/auth/2fa/recovery', {
method: 'POST',
body: JSON.stringify({ password: passwordDerived }),
})
}