diff --git a/src/bw.ts b/src/bw.ts index 98916c7..175ea73 100644 --- a/src/bw.ts +++ b/src/bw.ts @@ -137,7 +137,8 @@ export class Main { this.storageService, this.i18nService, this.cryptoFunctionService); this.vaultTimeoutService = new VaultTimeoutService(this.cipherService, this.folderService, 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.folderService, this.cipherService, this.cryptoService, this.collectionService, this.storageService, this.messagingService, this.policyService, this.sendService, diff --git a/src/services/nodeEnvSecureStorage.service.ts b/src/services/nodeEnvSecureStorage.service.ts index f2f0f8d..f964d45 100644 --- a/src/services/nodeEnvSecureStorage.service.ts +++ b/src/services/nodeEnvSecureStorage.service.ts @@ -19,7 +19,7 @@ export class NodeEnvSecureStorageService implements StorageService { } async has(key: string): Promise { - return await this.get(key) != null; + return (await this.get(key)) != null; } async save(key: string, obj: any): Promise {