fix(oauth): handle no user scenario (#3556)

This commit is contained in:
Alireza 2023-07-20 12:08:54 -04:00 committed by GitHub
parent 09a302250c
commit 81ab52784a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}`,
};