1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

[PM-26778] Make VaultTimeoutService use LogoutService (#16820)

* Make vaulttimeoutservice use logoutservice

* Fix browser build

* Fix mv3 build

* Fix lint
This commit is contained in:
Bernd Schoolmann
2025-10-21 17:24:52 +02:00
committed by GitHub
parent a5dd42396c
commit 5a307633bb
8 changed files with 23 additions and 32 deletions

View File

@@ -1,6 +1,7 @@
import { Injectable } from "@angular/core";
import { firstValueFrom, Observable } from "rxjs";
import { LogoutService } from "@bitwarden/auth/common";
import { Account } from "@bitwarden/common/auth/abstractions/account.service";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { CryptoFunctionService } from "@bitwarden/common/key-management/crypto/abstractions/crypto-function.service";
@@ -14,7 +15,6 @@ import {
WrappedPrivateKey,
WrappedSigningKey,
} from "@bitwarden/common/key-management/types";
import { VaultTimeoutService } from "@bitwarden/common/key-management/vault-timeout";
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
@@ -89,7 +89,7 @@ export class UserKeyRotationService {
private syncService: SyncService,
private webauthnLoginAdminService: WebauthnLoginAdminService,
private logService: LogService,
private vaultTimeoutService: VaultTimeoutService,
private logoutService: LogoutService,
private toastService: ToastService,
private i18nService: I18nService,
private dialogService: DialogService,
@@ -189,8 +189,7 @@ export class UserKeyRotationService {
timeout: 15000,
});
// temporary until userkey can be better verified
await this.vaultTimeoutService.logOut();
await this.logoutService.logout(user.id);
}
protected async ensureIsAllowedToRotateUserKey(): Promise<void> {