1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-08 19:43:15 +00:00

[bug] Add missing await to identity token refresh

This was causing weird behavior in web that was creating a lot of 429s
This commit is contained in:
addison
2021-11-18 16:39:27 -05:00
parent 013afc921b
commit 94125ab420

View File

@@ -1496,7 +1496,7 @@ export class ApiService implements ApiServiceAbstraction {
async getActiveBearerToken(): Promise<string> {
let accessToken = await this.tokenService.getToken();
if (this.tokenService.tokenNeedsRefresh()) {
if (await this.tokenService.tokenNeedsRefresh()) {
await this.doAuthRefresh();
accessToken = await this.tokenService.getToken();
}