mirror of
https://github.com/bitwarden/jslib
synced 2025-12-23 03:33:29 +00:00
[bug] Only save accessToken to storage
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user