1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

call api to set password with key parameters (#609)

* call api to set password with key parameters

* update ssoCompleteRegistration string
This commit is contained in:
Kyle Spearrin
2020-08-17 15:04:59 -04:00
committed by GitHub
parent 1fe7554818
commit e0ede7ba74
7 changed files with 134 additions and 57 deletions

View File

@@ -79,6 +79,16 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
}
}
async submit() {
const hasEncKey = await this.cryptoService.hasEncKey();
if (!hasEncKey) {
this.platformUtilsService.showToast('error', null, this.i18nService.t('updateKey'));
return;
}
await super.submit();
}
async setupSubmitActions() {
if (this.currentMasterPassword == null || this.currentMasterPassword === '') {
this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'),
@@ -90,7 +100,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
await this.syncService.fullSync(true);
}
super.setupSubmitActions();
return super.setupSubmitActions();
}
async performSubmitActions(newMasterPasswordHash: string, newKey: SymmetricCryptoKey,