Refactoring

This commit is contained in:
2025-01-19 15:26:38 -06:00
parent 2251917997
commit 8c49360653

View File

@@ -7,7 +7,7 @@ interface AuthProviderProps {
children: ReactNode children: ReactNode
} }
export const AuthProvider = ({ children }: AuthProviderProps ) => { export const AuthProvider = async ({ children }: AuthProviderProps ) => {
const msalInstance = new PublicClientApplication(msalConfig); const msalInstance = new PublicClientApplication(msalConfig);
// Default to using the first account if no account is active on page load // Default to using the first account if no account is active on page load
@@ -26,7 +26,8 @@ export const AuthProvider = ({ children }: AuthProviderProps ) => {
} }
}); });
msalInstance.handleRedirectPromise(); await msalInstance.initialize();
// msalInstance.handleRedirectPromise();
return <MsalProvider instance={msalInstance}> return <MsalProvider instance={msalInstance}>
{children} {children}