microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

[BUG] [MGT-MSAL2] Network downtime triggers a false user sign-out.

Open TechnicallyWilliams opened this issue 4 months ago • 3 comments

Describe the bug Network downtime triggers a false user sign-out.

To Reproduce Steps to reproduce the behavior:

  1. Sign-in to react-chat sample
  2. Force a network interruption. (ex. disable wifi)
  3. Msal2 provider will detect a sign-out and application will render sign-in page. (this happens after ~5-10 secs)
  4. Reconnect network. (ex. re-enable wifi)
  5. Refresh page. (page never detects network reconnection so refresh is required)
  6. 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 image image Upon page refresh image

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.

TechnicallyWilliams avatar Mar 01 '24 20:03 TechnicallyWilliams

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.

gavinbarron avatar Mar 01 '24 21:03 gavinbarron

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.

plasne avatar Mar 01 '24 21:03 plasne