fix(oauth): handle no user scenario (#3556)
This commit is contained in:
parent
09a302250c
commit
81ab52784a
@ -111,6 +111,12 @@ function OpenIdConnectRoutes({
|
|||||||
const getAuthorizationHeader = () => {
|
const getAuthorizationHeader = () => {
|
||||||
const user = userAuthenticationService.getUser();
|
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 {
|
return {
|
||||||
Authorization: `Bearer ${user.access_token}`,
|
Authorization: `Bearer ${user.access_token}`,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user