1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-15 01:11:47 +01:00

PM-8113 - TwoFactorAuth - update to latest authN session timeout logic

This commit is contained in:
Jared Snider 2025-01-23 18:19:43 -05:00
parent 37ac40098c
commit 1b72325aa6
No known key found for this signature in database
GPG Key ID: A149DDD612516286

View File

@ -113,7 +113,7 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy {
await this.submit();
};
private twoFactorSessionTimeoutRoute = "2fa-timeout";
private authenticationSessionTimeoutRoute = "authentication-timeout";
constructor(
private loginStrategyService: LoginStrategyServiceAbstraction,
@ -144,7 +144,7 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy {
this.orgSsoIdentifier =
this.activatedRoute.snapshot.queryParamMap.get("identifier") ?? undefined;
this.listenFor2faSessionTimeout();
this.listenForAuthnSessionTimeout();
await this.setSelected2faProviderType();
await this.set2faProviderData();
@ -192,8 +192,8 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy {
this.providerData = providerData;
}
private listenFor2faSessionTimeout() {
this.loginStrategyService.twoFactorTimeout$
private listenForAuthnSessionTimeout() {
this.loginStrategyService.authenticationSessionTimeout$
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(async (expired) => {
if (!expired) {
@ -201,10 +201,10 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy {
}
try {
await this.router.navigate([this.twoFactorSessionTimeoutRoute]);
await this.router.navigate([this.authenticationSessionTimeoutRoute]);
} catch (err) {
this.logService.error(
`Failed to navigate to ${this.twoFactorSessionTimeoutRoute} route`,
`Failed to navigate to ${this.authenticationSessionTimeoutRoute} route`,
err,
);
}