From 8c4936065349d24499f708b4ee2f937ddb387228 Mon Sep 17 00:00:00 2001 From: Noah Spannbauer Date: Sun, 19 Jan 2025 15:26:38 -0600 Subject: [PATCH] Refactoring --- app/src/hooks/auth/authProvider.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/hooks/auth/authProvider.tsx b/app/src/hooks/auth/authProvider.tsx index bd66d72..22e1f40 100644 --- a/app/src/hooks/auth/authProvider.tsx +++ b/app/src/hooks/auth/authProvider.tsx @@ -7,7 +7,7 @@ interface AuthProviderProps { children: ReactNode } -export const AuthProvider = ({ children }: AuthProviderProps ) => { +export const AuthProvider = async ({ children }: AuthProviderProps ) => { const msalInstance = new PublicClientApplication(msalConfig); // 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 {children}