mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-24 11:55:50 +01:00
purge state on lock/logout
This commit is contained in:
parent
5bc1d2c143
commit
e063c8b09d
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit 00f1aad65ea2e243713d409873dfb5d833296897
|
||||
Subproject commit 2aa71f98a1f623470b3bd71306e0ef8a1ba97758
|
@ -7,6 +7,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { LockService } from 'jslib/abstractions/lock.service';
|
||||
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { StateService } from 'jslib/abstractions/state.service';
|
||||
import { StorageService } from 'jslib/abstractions/storage.service';
|
||||
import { UserService } from 'jslib/abstractions/user.service';
|
||||
|
||||
@ -21,8 +22,8 @@ export class LockComponent extends BaseLockComponent {
|
||||
platformUtilsService: PlatformUtilsService, messagingService: MessagingService,
|
||||
userService: UserService, cryptoService: CryptoService,
|
||||
storageService: StorageService, lockService: LockService,
|
||||
environmentService: EnvironmentService) {
|
||||
environmentService: EnvironmentService, stateService: StateService) {
|
||||
super(router, i18nService, platformUtilsService, messagingService, userService, cryptoService,
|
||||
storageService, lockService, environmentService);
|
||||
storageService, lockService, environmentService, stateService);
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import { EnvironmentComponent } from './environment.component';
|
||||
import { AuthService } from 'jslib/abstractions/auth.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { StateService } from 'jslib/abstractions/state.service';
|
||||
import { StorageService } from 'jslib/abstractions/storage.service';
|
||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||
|
||||
@ -29,8 +30,8 @@ export class LoginComponent extends BaseLoginComponent {
|
||||
constructor(authService: AuthService, router: Router,
|
||||
i18nService: I18nService, syncService: SyncService,
|
||||
private componentFactoryResolver: ComponentFactoryResolver, storageService: StorageService,
|
||||
platformUtilsService: PlatformUtilsService) {
|
||||
super(authService, router, platformUtilsService, i18nService, storageService);
|
||||
platformUtilsService: PlatformUtilsService, stateService: StateService) {
|
||||
super(authService, router, platformUtilsService, i18nService, storageService, stateService);
|
||||
super.onSuccessfulLogin = () => {
|
||||
return syncService.fullSync(true);
|
||||
};
|
||||
|
@ -16,6 +16,8 @@ import { AuthService } from 'jslib/abstractions/auth.service';
|
||||
import { EnvironmentService } from 'jslib/abstractions/environment.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { StateService } from 'jslib/abstractions/state.service';
|
||||
import { StorageService } from 'jslib/abstractions/storage.service';
|
||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||
|
||||
import { ModalComponent } from 'jslib/angular/components/modal.component';
|
||||
@ -33,8 +35,10 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
constructor(authService: AuthService, router: Router,
|
||||
i18nService: I18nService, apiService: ApiService,
|
||||
platformUtilsService: PlatformUtilsService, syncService: SyncService,
|
||||
environmentService: EnvironmentService, private componentFactoryResolver: ComponentFactoryResolver) {
|
||||
super(authService, router, i18nService, apiService, platformUtilsService, window, environmentService);
|
||||
environmentService: EnvironmentService, private componentFactoryResolver: ComponentFactoryResolver,
|
||||
stateService: StateService, storageService: StorageService) {
|
||||
super(authService, router, i18nService, apiService, platformUtilsService, window, environmentService,
|
||||
stateService, storageService);
|
||||
super.onSuccessfulLogin = () => {
|
||||
return syncService.fullSync(true);
|
||||
};
|
||||
|
@ -42,6 +42,7 @@ import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { SearchService } from 'jslib/abstractions/search.service';
|
||||
import { SettingsService } from 'jslib/abstractions/settings.service';
|
||||
import { StateService } from 'jslib/abstractions/state.service';
|
||||
import { StorageService } from 'jslib/abstractions/storage.service';
|
||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||
import { SystemService } from 'jslib/abstractions/system.service';
|
||||
@ -92,7 +93,8 @@ export class AppComponent implements OnInit {
|
||||
private cryptoService: CryptoService, private componentFactoryResolver: ComponentFactoryResolver,
|
||||
private messagingService: MessagingService, private collectionService: CollectionService,
|
||||
private searchService: SearchService, private notificationsService: NotificationsService,
|
||||
private platformUtilsService: PlatformUtilsService, private systemService: SystemService) { }
|
||||
private platformUtilsService: PlatformUtilsService, private systemService: SystemService,
|
||||
private stateService: StateService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.ngZone.runOutsideAngular(() => {
|
||||
@ -139,6 +141,7 @@ export class AppComponent implements OnInit {
|
||||
if (this.modal != null) {
|
||||
this.modal.close();
|
||||
}
|
||||
this.stateService.purge();
|
||||
this.router.navigate(['lock']);
|
||||
this.notificationsService.updateConnection();
|
||||
this.updateAppMenu();
|
||||
@ -219,6 +222,7 @@ export class AppComponent implements OnInit {
|
||||
this.collectionService.clear(userId),
|
||||
this.passwordGenerationService.clear(),
|
||||
this.lockService.clear(),
|
||||
this.stateService.purge(),
|
||||
]);
|
||||
|
||||
this.lockService.pinLocked = false;
|
||||
|
Loading…
Reference in New Issue
Block a user