Skip to content
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

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

Open
TechnicallyWilliams opened this issue Mar 1, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@TechnicallyWilliams
Copy link

TechnicallyWilliams commented Mar 1, 2024

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 TechnicallyWilliams added bug Something isn't working Needs: Triage 🔍 labels Mar 1, 2024
@gavinbarron
Copy link
Member

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.

@plasne
Copy link

plasne commented Mar 1, 2024

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.

@gavinbarron gavinbarron added this to the Chat - GA milestone Mar 4, 2024
@TechnicallyWilliams TechnicallyWilliams changed the title [BUG] [MGT-MSAL2] Network downtime does not trigger a true user sign-out. [BUG] [MGT-MSAL2] Network downtime triggers a false user sign-out. Mar 6, 2024
@TechnicallyWilliams
Copy link
Author

The hotfix could be to use an unclosable modal pop up in the sample. This would force the user to refresh the page.

@Mnickii Mnickii modified the milestones: Chat - GA, 4.2.5 Aug 9, 2024
@Mnickii Mnickii removed this from the 4.2.5 milestone Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo 📃
Development

No branches or pull requests

5 participants