mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
* Get either 'Bitwarden' and 'Bitwarden_biometric' keys. * Fix let var typo * Fix string handling error * Retrieve biometric key from Desktop * Null check key
15 lines
522 B
TypeScript
15 lines
522 B
TypeScript
import { KeySuffixOptions } from 'jslib-common/abstractions/storage.service';
|
|
import { CryptoService } from 'jslib-common/services/crypto.service';
|
|
|
|
export class BrowserCryptoService extends CryptoService {
|
|
protected async retrieveKeyFromStorage(keySuffix: KeySuffixOptions) {
|
|
if (keySuffix === 'biometric') {
|
|
await this.platformUtilService.authenticateBiometric();
|
|
return (await this.getKey())?.keyB64;
|
|
}
|
|
|
|
return await super.retrieveKeyFromStorage(keySuffix);
|
|
}
|
|
|
|
}
|