microsoft-graph-toolkit
microsoft-graph-toolkit copied to clipboard
[BUG] [MGT-MSAL2] Network downtime triggers a false user sign-out.
Describe the bug Network downtime triggers a false user sign-out.
To Reproduce Steps to reproduce the behavior:
- Sign-in to react-chat sample
- Force a network interruption. (ex. disable wifi)
- Msal2 provider will detect a sign-out and application will render sign-in page. (this happens after ~5-10 secs)
- Reconnect network. (ex. re-enable wifi)
- Refresh page. (page never detects network reconnection so refresh is required)
- Observe that the user is actually still signed-in. User was never truly signed-out.
Expected behavior MSAL2 provider does not change state upon network interruption. Or process is able to detect network reconnection.
Screenshots
Upon page refresh
Environment:
OS: Windows 11 Browser: Edge, InPrivate window Framework: React Context: Web Version: MGT v4 Provider: Msal2Provider Additional context I am a MSFT FTE and can be reached on Teams at dexterw.
Root cause is an exception trying to fetch a new access token.
This will be problematic to resolve. The providers were not designed or built with transient network issues in mind.
To add more to this, the concern with shared workstations is someone thinks they are signed-out and walk away and someone else refreshes the screen and is reconnected.