-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix msal-react SSR hydration errors #5399
Conversation
Codecov Report
*This pull request uses carry forward flags. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Was this addressing an issue opened by a customer, or something you noticed?
It was brought to my attention in a Discussions post as well as in our Teams channel |
🎉 Handy links: |
When attempting to use msal-react in an SSR app it results in hydration errors when a using
MsalAuthenticationTemplate
oruseIsAuthenticated
. This PR fixes this behavior by defaulting the value ofuseIsAuthenticated
tofalse
wheninProgress
isStartup
(which it will always be server-side and on the first render client-side)