1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00

clear user index before account is totally cleaned up

This commit is contained in:
gbubemismith
2024-04-11 01:48:00 +01:00
parent 0795fef252
commit 4fdc9c6e65

View File

@@ -587,6 +587,7 @@ export class AppComponent implements OnInit, OnDestroy {
await this.passwordGenerationService.clear(userBeingLoggedOut);
await this.vaultTimeoutSettingsService.clear(userBeingLoggedOut);
await this.biometricStateService.logout(userBeingLoggedOut as UserId);
await this.searchService.clearIndex();
await this.stateEventRunnerService.handleEvent("logout", userBeingLoggedOut as UserId);
@@ -609,7 +610,6 @@ export class AppComponent implements OnInit, OnDestroy {
// This must come last otherwise the logout will prematurely trigger
// a process reload before all the state service user data can be cleaned up
if (userBeingLoggedOut === preLogoutActiveUserId) {
await this.searchService.clearIndex();
this.authService.logOut(async () => {
if (expired) {
this.platformUtilsService.showToast(