mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
revert: [PR-13659] remove 2FA timeout logging and fix attempts
This reverts two previous commits: - PM-13659 - 2FA Timeout Log All the things (#12275) - Auth/PM-13659 - 2FA Timeout - Attempted Fix (#12263)
This commit is contained in:
@@ -102,20 +102,10 @@ 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;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InjectionToken } from "@angular/core";
|
||||
import { Observable, Subject } from "rxjs";
|
||||
|
||||
import { Executor, LogoutReason } from "@bitwarden/auth/common";
|
||||
import { LogoutReason } from "@bitwarden/auth/common";
|
||||
import { ClientType } from "@bitwarden/common/enums";
|
||||
import { RegionConfig } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||
import {
|
||||
@@ -68,7 +68,3 @@ export const REFRESH_ACCESS_TOKEN_ERROR_CALLBACK = new SafeInjectionToken<() =>
|
||||
export const ENV_ADDITIONAL_REGIONS = new SafeInjectionToken<RegionConfig[]>(
|
||||
"ENV_ADDITIONAL_REGIONS",
|
||||
);
|
||||
|
||||
export const AUTHN_SESSION_TIMEOUT_EXECUTOR = new SafeInjectionToken<Executor>(
|
||||
"AuthnSessionTimeoutExecutor",
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ErrorHandler, LOCALE_ID, NgModule, NgZone } from "@angular/core";
|
||||
import { ErrorHandler, LOCALE_ID, NgModule } from "@angular/core";
|
||||
import { Subject } from "rxjs";
|
||||
|
||||
import {
|
||||
@@ -319,7 +319,6 @@ import {
|
||||
CLIENT_TYPE,
|
||||
REFRESH_ACCESS_TOKEN_ERROR_CALLBACK,
|
||||
ENV_ADDITIONAL_REGIONS,
|
||||
AUTHN_SESSION_TIMEOUT_EXECUTOR,
|
||||
} from "./injection-tokens";
|
||||
import { ModalService } from "./modal.service";
|
||||
|
||||
@@ -412,11 +411,6 @@ const safeProviders: SafeProvider[] = [
|
||||
TokenServiceAbstraction,
|
||||
],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: AUTHN_SESSION_TIMEOUT_EXECUTOR,
|
||||
useFactory: (ngZone: NgZone) => (fn: () => void) => ngZone.run(fn),
|
||||
deps: [NgZone],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: LoginStrategyServiceAbstraction,
|
||||
useClass: LoginStrategyService,
|
||||
@@ -446,7 +440,6 @@ const safeProviders: SafeProvider[] = [
|
||||
VaultTimeoutSettingsServiceAbstraction,
|
||||
KdfConfigService,
|
||||
TaskSchedulerService,
|
||||
AUTHN_SESSION_TIMEOUT_EXECUTOR,
|
||||
],
|
||||
}),
|
||||
safeProvider({
|
||||
|
||||
Reference in New Issue
Block a user