mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-21 16:18:28 +01:00
Do not drop optional parameters in overrides (#7176)
This commit is contained in:
parent
a40643d9d6
commit
b4dbace7a6
@ -18,15 +18,18 @@ export class BrowserCryptoService extends CryptoService {
|
||||
* Browser doesn't store biometric keys, so we retrieve them from the desktop and return
|
||||
* if we successfully saved it into memory as the User Key
|
||||
*/
|
||||
protected override async getKeyFromStorage(keySuffix: KeySuffixOptions): Promise<UserKey> {
|
||||
protected override async getKeyFromStorage(
|
||||
keySuffix: KeySuffixOptions,
|
||||
userId?: string,
|
||||
): Promise<UserKey> {
|
||||
if (keySuffix === KeySuffixOptions.Biometric) {
|
||||
await this.platformUtilService.authenticateBiometric();
|
||||
const userKey = await this.stateService.getUserKey();
|
||||
const userKey = await this.stateService.getUserKey({ userId: userId });
|
||||
if (userKey) {
|
||||
return new SymmetricCryptoKey(Utils.fromB64ToArray(userKey.keyB64)) as UserKey;
|
||||
}
|
||||
}
|
||||
|
||||
return await super.getKeyFromStorage(keySuffix);
|
||||
return await super.getKeyFromStorage(keySuffix, userId);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user