mirror of
https://github.com/bitwarden/cli
synced 2025-12-15 15:53:44 +00:00
Fix cli lock and logout (#334)
* Ensure order of operations
* Key removal is necessary to properly lock
* Update jslib
(cherry picked from commit 65160f3bf4)
This commit is contained in:
@@ -137,7 +137,8 @@ export class Main {
|
|||||||
this.storageService, this.i18nService, this.cryptoFunctionService);
|
this.storageService, this.i18nService, this.cryptoFunctionService);
|
||||||
this.vaultTimeoutService = new VaultTimeoutService(this.cipherService, this.folderService,
|
this.vaultTimeoutService = new VaultTimeoutService(this.cipherService, this.folderService,
|
||||||
this.collectionService, this.cryptoService, this.platformUtilsService, this.storageService,
|
this.collectionService, this.cryptoService, this.platformUtilsService, this.storageService,
|
||||||
this.messagingService, this.searchService, this.userService, this.tokenService, null, null);
|
this.messagingService, this.searchService, this.userService, this.tokenService,
|
||||||
|
async () => await this.cryptoService.clearStoredKey('auto'), null);
|
||||||
this.syncService = new SyncService(this.userService, this.apiService, this.settingsService,
|
this.syncService = new SyncService(this.userService, this.apiService, this.settingsService,
|
||||||
this.folderService, this.cipherService, this.cryptoService, this.collectionService,
|
this.folderService, this.cipherService, this.cryptoService, this.collectionService,
|
||||||
this.storageService, this.messagingService, this.policyService, this.sendService,
|
this.storageService, this.messagingService, this.policyService, this.sendService,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export class NodeEnvSecureStorageService implements StorageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async has(key: string): Promise<boolean> {
|
async has(key: string): Promise<boolean> {
|
||||||
return await this.get(key) != null;
|
return (await this.get(key)) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async save(key: string, obj: any): Promise<any> {
|
async save(key: string, obj: any): Promise<any> {
|
||||||
|
|||||||
Reference in New Issue
Block a user