1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-29 11:05:54 +02:00

Do not drop optional parameters in overrides (#7176)

This commit is contained in:
Matt Gibson 2023-12-11 13:44:23 -05:00 committed by GitHub
parent a40643d9d6
commit b4dbace7a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}