Skip to content

Commit

Permalink
Revert "Add toast message on session timeout"
Browse files Browse the repository at this point in the history
This reverts commit 9a8c143.
  • Loading branch information
alec-livefront committed Jan 14, 2025
1 parent ab91188 commit 491f29a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
5 changes: 0 additions & 5 deletions apps/cli/src/service-container/service-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
} from "@bitwarden/auth/common";
import { EventCollectionService as EventCollectionServiceAbstraction } from "@bitwarden/common/abstractions/event/event-collection.service";
import { EventUploadService as EventUploadServiceAbstraction } from "@bitwarden/common/abstractions/event/event-upload.service";
import { ToastService } from "@bitwarden/common/abstractions/toast.service";
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
import { PolicyApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction";
import { ProviderApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/provider/provider-api.service.abstraction";
Expand Down Expand Up @@ -268,7 +267,6 @@ export class ServiceContainer {
taskSchedulerService: TaskSchedulerService;
sdkService: SdkService;
cipherAuthorizationService: CipherAuthorizationService;
toastService: ToastService;

constructor() {
let p = null;
Expand Down Expand Up @@ -649,7 +647,6 @@ export class ServiceContainer {
this.vaultTimeoutSettingsService,
this.kdfConfigService,
this.taskSchedulerService,
this.toastService,
);

// FIXME: CLI does not support autofill
Expand Down Expand Up @@ -828,8 +825,6 @@ export class ServiceContainer {
this.collectionService,
this.organizationService,
);

this.toastService = new ToastService();
}

async logout() {
Expand Down
1 change: 0 additions & 1 deletion libs/angular/src/services/jslib-services.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ const safeProviders: SafeProvider[] = [
VaultTimeoutSettingsServiceAbstraction,
KdfConfigService,
TaskSchedulerService,
ToastService,
],
}),
safeProvider({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import { TaskSchedulerService, ScheduledTaskNames } from "@bitwarden/common/plat
import { GlobalState, GlobalStateProvider } from "@bitwarden/common/platform/state";
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
import { MasterKey } from "@bitwarden/common/types/key";
import { ToastService } from "@bitwarden/components";
import {
KdfType,
KeyService,
Expand Down Expand Up @@ -122,7 +121,6 @@ export class LoginStrategyService implements LoginStrategyServiceAbstraction {
protected vaultTimeoutSettingsService: VaultTimeoutSettingsService,
protected kdfConfigService: KdfConfigService,
protected taskSchedulerService: TaskSchedulerService,
protected toastService: ToastService,
) {
this.currentAuthnTypeState = this.stateProvider.get(CURRENT_LOGIN_STRATEGY_KEY);
this.loginStrategyCacheState = this.stateProvider.get(CACHE_KEY);
Expand Down Expand Up @@ -272,11 +270,6 @@ export class LoginStrategyService implements LoginStrategyServiceAbstraction {
*/
async logInNewDeviceVerification(deviceVerificationOtp: string): Promise<AuthResult> {
if (!(await this.isSessionValid())) {
this.toastService.showToast({
variant: "error",
message: this.i18nService.t("sessionTimeout"),
title: "",
});
throw new Error(this.i18nService.t("sessionTimeout"));

Check warning on line 273 in libs/auth/src/common/services/login-strategies/login-strategy.service.ts

View check run for this annotation

Codecov / codecov/patch

libs/auth/src/common/services/login-strategies/login-strategy.service.ts#L273

Added line #L273 was not covered by tests
}

Expand Down

0 comments on commit 491f29a

Please sign in to comment.