🛡️ fix: OTP Verification For 2FA Disable Operation (#8975)

This commit is contained in:
Danny Avila 2025-08-10 15:05:16 -04:00 committed by GitHub
parent edf33bedcb
commit 7e4c8a5d0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 58 additions and 30 deletions

View file

@ -815,8 +815,8 @@ export function confirmTwoFactor(payload: t.TVerify2FARequest): Promise<t.TVerif
return request.post(endpoints.confirmTwoFactor(), payload);
}
export function disableTwoFactor(): Promise<t.TDisable2FAResponse> {
return request.post(endpoints.disableTwoFactor());
export function disableTwoFactor(payload?: t.TDisable2FARequest): Promise<t.TDisable2FAResponse> {
return request.post(endpoints.disableTwoFactor(), payload);
}
export function regenerateBackupCodes(): Promise<t.TRegenerateBackupCodesResponse> {

View file

@ -413,6 +413,14 @@ export type TVerify2FATempResponse = {
message?: string;
};
/**
* Request for disabling 2FA.
*/
export type TDisable2FARequest = {
token?: string;
backupCode?: string;
};
/**
* Response from disabling 2FA.
*/