mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[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:
@@ -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"),
|
||||||
|
|||||||
Reference in New Issue
Block a user