[PM-3600] Try to get key in master password reprompt check (#6087)
* Add check to hasMasterPasswordAndMasterKeyHash to make sure getMasterKey() has a value * Try getting or deriving the key on password reprompt
This commit is contained in:
parent
93c11a7dab
commit
30d8168c2e
|
@ -27,7 +27,8 @@ export class PasswordRepromptComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
if (!(await this.cryptoService.compareAndUpdateKeyHash(this.masterPassword, null))) {
|
const storedMasterKey = await this.cryptoService.getOrDeriveMasterKey(this.masterPassword);
|
||||||
|
if (!(await this.cryptoService.compareAndUpdateKeyHash(this.masterPassword, storedMasterKey))) {
|
||||||
this.platformUtilsService.showToast(
|
this.platformUtilsService.showToast(
|
||||||
"error",
|
"error",
|
||||||
this.i18nService.t("errorOccurred"),
|
this.i18nService.t("errorOccurred"),
|
||||||
|
|
Loading…
Reference in New Issue