Skip to content

Commit

Permalink
Merge branch 'km/fix-autoprompt' into km/fix-badge-mv2
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten authored Jan 14, 2025
2 parents 90c06f6 + 89fcc85 commit 329ef91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/browser/src/popup/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ToastOptions,
ToastService,
} from "@bitwarden/components";
import { BiometricStateService } from "@bitwarden/key-management";
import { BiometricsService, BiometricStateService } from "@bitwarden/key-management";

import { PopupCompactModeService } from "../platform/popup/layout/popup-compact-mode.service";
import { PopupViewCacheService } from "../platform/popup/view-cache/popup-view-cache.service";
Expand Down Expand Up @@ -66,6 +66,7 @@ export class AppComponent implements OnInit, OnDestroy {
private accountService: AccountService,
private animationControlService: AnimationControlService,
private biometricStateService: BiometricStateService,
private biometricsService: BiometricsService,
) {}

async ngOnInit() {
Expand Down Expand Up @@ -102,7 +103,7 @@ export class AppComponent implements OnInit, OnDestroy {

this.messageListener.allMessages$
.pipe(
tap((msg: any) => {
tap(async (msg: any) => {
if (msg.command === "doneLoggingOut") {
// TODO: PM-8544 - why do we call logout in the popup after receiving the doneLoggingOut message? Hasn't this already completeted logout?
this.authService.logOut(async () => {
Expand All @@ -119,6 +120,7 @@ export class AppComponent implements OnInit, OnDestroy {
msg.command === "locked" &&
(msg.userId == null || msg.userId == this.activeUserId)
) {
await this.biometricsService.setShouldAutopromptNow(false);
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate(["lock"]);
Expand Down

0 comments on commit 329ef91

Please sign in to comment.