Skip to content

Commit

Permalink
Merge pull request #74 from tmkasun/refresh-fix2
Browse files Browse the repository at this point in the history
add await for requestCustomGrant
  • Loading branch information
thivi authored Dec 14, 2021
2 parents 4cca8aa + 1bfea97 commit 9be16df
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/src/clients/main-thread-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,10 @@ export const MainThreadClient = async (
const refreshAccessToken = async (): Promise<BasicUserInfo> => {
try {
await _authenticationClient.refreshAccessToken();
await getCustomGrantConfigData().then((customGrantConfig) => {
const customGrantConfig = await getCustomGrantConfigData();
if (customGrantConfig) {
requestCustomGrant(customGrantConfig);
await requestCustomGrant(customGrantConfig);
}
});
_spaHelper.refreshAccessTokenAutomatically();

return _authenticationClient.getBasicUserInfo();
Expand Down

0 comments on commit 9be16df

Please sign in to comment.