-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
piggy-back on current authentication request
It was previously possible for multiple outbound /user_management/authenticate requests to happen simultaneously if `getAccessToken` was called multiple times when the current access token had expired. This PR moves the authenticate request into the client state so that subsequent calls to `getAccessToken` can just await the existing one.
- Loading branch information
Showing
4 changed files
with
58 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export class AuthKitError extends Error {} | ||
export class RefreshError extends AuthKitError {} | ||
export class CodeExchangeError extends AuthKitError {} | ||
export class LoginRequiredError extends AuthKitError { | ||
readonly message: string = "No access token available"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters