TanStackT
TanStack12mo ago
2 replies
clean-aquamarine

Router with azure msal-browser & msal-react

Does anyone have an example with tanstack/router integrated with microsoft's msal for authentication?

I have an app built with react router, and when I try use the same msal config and setup, I get an error
uninitialized_public_client_application: You must call and await the initialize function before attempting to call any other MSAL API.  For more visit: aka.ms/msaljs/browser-errors


However the MsalProvider component does the initialization on my other project, so trying to wrap my head around that one, in case it would be a bad idea if both call initialize.

Thanks for any pointers in the right direction.
Was this page helpful?