Skip to content

Commit

Permalink
Allow browser extension unlock while desktop is locked (#9945)
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten authored Jul 31, 2024
1 parent 86acca3 commit 3de85c7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions apps/desktop/src/services/native-messaging.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { firstValueFrom, map } from "rxjs";

import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service";
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
Expand Down Expand Up @@ -145,11 +144,6 @@ export class NativeMessagingService {
return this.send({ command: "biometricUnlock", response: "not unlocked" }, appId);
}

const authStatus = await firstValueFrom(this.authService.authStatusFor$(userId));
if (authStatus !== AuthenticationStatus.Unlocked) {
return this.send({ command: "biometricUnlock", response: "not unlocked" }, appId);
}

const biometricUnlockPromise =
message.userId == null
? firstValueFrom(this.biometricStateService.biometricUnlockEnabled$)
Expand Down Expand Up @@ -183,6 +177,7 @@ export class NativeMessagingService {
},
appId,
);
await ipc.platform.reloadProcess();
} else {
await this.send({ command: "biometricUnlock", response: "canceled" }, appId);
}
Expand Down

0 comments on commit 3de85c7

Please sign in to comment.