1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-22 19:23:24 +00:00

[bug] Only save accessToken to storage

This commit is contained in:
addison
2021-11-12 12:35:11 -05:00
parent 856236ffca
commit 01f7d2b8ce

View File

@@ -1,6 +1,5 @@
import { StateService } from '../abstractions/state.service';
import { TokenService as TokenServiceAbstraction } from '../abstractions/token.service';
import { StorageLocation } from '../enums/storageLocation';
import { Utils } from '../misc/utils';
@@ -40,10 +39,7 @@ export class TokenService implements TokenServiceAbstraction {
}
async setToken(token: string): Promise<void> {
await this.stateService.setAccessToken(token, { storageLocation: StorageLocation.Memory });
if (!await this.skipTokenStorage()) {
await this.stateService.setAccessToken(token, { storageLocation: StorageLocation.Disk });
}
await this.stateService.setAccessToken(token);
}
async getToken(): Promise<string> {