diff --git a/common/src/services/token.service.ts b/common/src/services/token.service.ts index 9ca68026..dd60b478 100644 --- a/common/src/services/token.service.ts +++ b/common/src/services/token.service.ts @@ -40,9 +40,9 @@ export class TokenService implements TokenServiceAbstraction { } async setToken(token: string): Promise { - this.stateService.setAccessToken(token, { storageLocation: StorageLocation.Memory }); + await this.stateService.setAccessToken(token, { storageLocation: StorageLocation.Memory }); if (!await this.skipTokenStorage()) { - this.stateService.setAccessToken(token, { storageLocation: StorageLocation.Disk }); + await this.stateService.setAccessToken(token, { storageLocation: StorageLocation.Disk }); } } @@ -54,7 +54,7 @@ export class TokenService implements TokenServiceAbstraction { if (await this.skipTokenStorage()) { return; } - return this.stateService.setRefreshToken(refreshToken); + return await this.stateService.setRefreshToken(refreshToken); } async getRefreshToken(): Promise { @@ -81,16 +81,16 @@ export class TokenService implements TokenServiceAbstraction { await this.setClientSecret(clientSecret); } - setTwoFactorToken(token: string): Promise { - return this.stateService.setTwoFactorToken(token); + async setTwoFactorToken(token: string): Promise { + return await this.stateService.setTwoFactorToken(token); } - getTwoFactorToken(): Promise { - return this.stateService.getTwoFactorToken(); + async getTwoFactorToken(): Promise { + return await this.stateService.getTwoFactorToken(); } - clearTwoFactorToken(): Promise { - return this.stateService.setTwoFactorToken(null); + async clearTwoFactorToken(): Promise { + return await this.stateService.setTwoFactorToken(null); } async clearToken(): Promise {