Browse Source

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

PS-589-add-2fa-new-device-login-settings-flag
Federico Andrés Maccaroni 4 years ago
parent
commit
c1f30641de
  1. 17
      src/app/settings/two-factor-setup.component.ts
  2. 9
      src/locales/en/messages.json

17
src/app/settings/two-factor-setup.component.ts

@ -207,6 +207,23 @@ export class TwoFactorSetupComponent implements OnInit { @@ -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)
);

9
src/locales/en/messages.json

@ -5081,5 +5081,14 @@ @@ -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"
}
}
}
}

Loading…
Cancel
Save