1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

PM-13659 - 2FA Timeout Log All the things (#12275)

This commit is contained in:
Jared Snider
2024-12-06 12:43:17 -05:00
committed by GitHub
parent 7e2456224d
commit 9fcc4f0543
3 changed files with 47 additions and 1 deletions

View File

@@ -102,10 +102,20 @@ export class TwoFactorComponent extends CaptchaProtectedComponent implements OnI
super(environmentService, i18nService, platformUtilsService, toastService);
this.webAuthnSupported = this.platformUtilsService.supportsWebAuthn(win);
this.logService.info(
"Subscribing to timeout on LoginStrategyService with service id: " +
this.loginStrategyService.id,
);
// Add subscription to twoFactorTimeout$ and navigate to twoFactorTimeoutRoute if expired
this.loginStrategyService.twoFactorTimeout$
.pipe(takeUntilDestroyed())
.subscribe(async (expired) => {
this.logService.info(
"Received emission from LoginStrategyService.twoFactorTimeout$ with service id: " +
this.loginStrategyService.id,
);
if (!expired) {
return;
}