-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Hi,
I stumbled upon a bug where the app will not be rendered (blank white screen) when the user doesn't have First name and/or Last name setup in Azure AD.
In this scenario the Azure AD authentication succeeds, but react-adal will not render the app (the require below will not run)
import { runWithAdal } from 'react-adal';
import { authContext } from './config/adalConfig';
const DO_NOT_LOGIN = false;
// auth with Azure AD. ADAL will handle entire auth
runWithAdal(authContext, () => {
// eslint-disable-next-line
require('./indexApp.js');
}, DO_NOT_LOGIN);
This is my adal config:
import { AuthenticationContext } from 'react-adal';
export const adalConfig = {
tenant: process.env.REACT_APP_AD_TENANT,
clientId: process.env.REACT_APP_AD_CLIENTID,
redirectUri: process.env.REACT_APP_SELF_DOMAIN,
endpoints: {
api: process.env.REACT_APP_AD_ENDPOINT,
},
cacheLocation: 'sessionStorage',
};
export const authContext = new AuthenticationContext(adalConfig);
export const getToken = () => authContext.getCachedToken(adalConfig.clientId);
export const getUser = () => authContext.getCachedUser(adalConfig.clientId);
Metadata
Metadata
Assignees
Labels
No labels