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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user