Added regenerate totp button to the click event for enabling totp

This commit is contained in:
Chesspro13 2024-05-03 15:22:19 -07:00
parent 4574b81caf
commit f8d1d553df
2 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,7 @@ export default class MultiFactorAuthenticationOptions extends OptionsWidget {
this.$totpSecretInput.prop("disabled", !result.message); this.$totpSecretInput.prop("disabled", !result.message);
this.$saveTotpButton.prop("disabled", !result.message); this.$saveTotpButton.prop("disabled", !result.message);
this.$totpSecret.prop("disapbled", !result.message); this.$totpSecret.prop("disapbled", !result.message);
this.$regenerateTotpButton.prop("disabled", !result.message);
} else { } else {
toastService.showError(result.message); toastService.showError(result.message);
} }

View File

@ -39,6 +39,7 @@ function disableTOTP() {
} }
function setTotpSecret(req: Request) { function setTotpSecret(req: Request) {
// TODO: CHECK VALIDITY OF SECRET
options.setOption options.setOption
totp_fs.saveTotpSecret(req.body.secret) totp_fs.saveTotpSecret(req.body.secret)
} }