PS-589 Added device verification enabling confirmation displaying the email being used to deliver the verification codes

This commit is contained in:
Federico Andrés Maccaroni 2022-05-25 17:58:25 -03:00
parent 6b0d793bf9
commit c1f30641de
2 changed files with 26 additions and 0 deletions

View File

@ -207,6 +207,23 @@ export class TwoFactorSetupComponent implements OnInit {
async submit() {
try {
if (this.enableDeviceVerification) {
const email = await this.stateService.getEmail();
const confirmed = await this.platformUtilsService.showDialog(
this.i18nService.t(
"areYouSureYouWantToEnableDeviceVerificationTheVerificationCodeEmailsWillArriveAtX",
email
),
this.i18nService.t("deviceVerification"),
this.i18nService.t("yes"),
this.i18nService.t("no"),
"warning"
);
if (!confirmed) {
return;
}
}
this.formPromise = this.apiService.putDeviceVerificationSettings(
new DeviceVerificationRequest(this.enableDeviceVerification)
);

View File

@ -5081,5 +5081,14 @@
},
"updatedDeviceVerification": {
"message": "Updated Device Verification"
},
"areYouSureYouWantToEnableDeviceVerificationTheVerificationCodeEmailsWillArriveAtX": {
"message": "Are you sure you want to enable Device Verification? The verification code emails will arrive at: $EMAIL$",
"placeholders": {
"email": {
"content": "$1",
"example": "My Email"
}
}
}
}