Skip to content

Commit

Permalink
fix(oauth): handle no user scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Jul 20, 2023
1 parent 6d88978 commit 1b60ae1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platform/app/src/utils/OpenIdConnectRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ function OpenIdConnectRoutes({
const getAuthorizationHeader = () => {
const user = userAuthenticationService.getUser();

// if the user is null return early, next time
// we hit this function we will have a user
if (!user) {
return;
}

return {
Authorization: `Bearer ${user.access_token}`,
};
Expand Down

0 comments on commit 1b60ae1

Please sign in to comment.