mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
Desktop biometrics support (#119)
* Initial work on windows hello support * Switch to use windows.security.credentials.ui UserConsentVerifier * Fix linting warnings * Remove unessesary supportsBiometric from lock screen * Rename biometric.main to windows.biometric.main. Add abstraction for biometric. * Add support for dynamic biometric text. * Add untested darwin implementation * Rename fingerprintUnlock to biometric * Add new functions to cliPlatformUtils.service.ts. * Hide login if biometric is not supported * Export default for biometric.*.main.ts * Remove @nodert-win10-rs4/windows.security.credentials * Add build requirements to readme * Auto prompt biometric when starting the application. * Ensure we support biometric before trying to auto prompt. * Fix review comments and linting errors
This commit is contained in:
@@ -22,6 +22,7 @@ import { MessagingService } from '../abstractions/messaging.service';
|
||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||
import { TokenService } from '../abstractions/token.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
import { VaultTimeoutService } from '../abstractions/vaultTimeout.service';
|
||||
|
||||
export const TwoFactorProviders = {
|
||||
[TwoFactorProviderType.Authenticator]: {
|
||||
@@ -89,7 +90,7 @@ export class AuthService implements AuthServiceAbstraction {
|
||||
private userService: UserService, private tokenService: TokenService,
|
||||
private appIdService: AppIdService, private i18nService: I18nService,
|
||||
private platformUtilsService: PlatformUtilsService, private messagingService: MessagingService,
|
||||
private setCryptoKeys = true) { }
|
||||
private vaultTimeoutService: VaultTimeoutService, private setCryptoKeys = true) { }
|
||||
|
||||
init() {
|
||||
TwoFactorProviders[TwoFactorProviderType.Email].name = this.i18nService.t('emailTitle');
|
||||
@@ -317,6 +318,7 @@ export class AuthService implements AuthServiceAbstraction {
|
||||
await this.cryptoService.setEncPrivateKey(tokenResponse.privateKey);
|
||||
}
|
||||
|
||||
this.vaultTimeoutService.biometricLocked = false;
|
||||
this.messagingService.send('loggedIn');
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user