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

isLoggedIn incorrect after periods of inactivity #172

Open
sachams opened this issue Nov 22, 2024 · 3 comments
Open

isLoggedIn incorrect after periods of inactivity #172

sachams opened this issue Nov 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sachams
Copy link

sachams commented Nov 22, 2024

isLoggedIn incorrect after periods of inactivity

Description

After the fix in #166 I thought the issue with isLoggedIn not being updated correctly were resolved. However, I still find cases where isLoggedIn is incorrectly set to false.

Affects package

react-sdk

Affects versions

"@fusionauth/react-sdk@npm:^2.4.3":
  version: 2.4.3
  resolution: "@fusionauth/react-sdk@npm:2.4.3"
  dependencies:
    classnames: "npm:^2.3.2"
  peerDependencies:
    react: ">=18.2.0"
    react-dom: ">=18.2.0"
  checksum: 10c0/3275cd3f1c75f489d95dc2cc4316305aa94b8ce584316e1b7863acb23177549cdeaf262dc67d943fb97f808fbb73ce7d10a05e1d21500a908cf441200619eec8
  languageName: node
  linkType: hard

Steps to reproduce

Note that this doesn't always reproduce the behaviour unfortunately. Sometimes the steps below trigger it, sometimes not.

  1. Add logging like this into App, and set the JWT token expiry to 15s
console.log("App: isLoggedIn", isLoggedIn, " isFetchingUserInfo", isFetchingUserInfo)
  1. Change to another tab in the browser (so the application tab is not visible)
  2. Wait 30s
  3. Go back to the application tab
  4. isLoggedOut is false 💣

Expected behavior

The isLoggedIn flag is true - all the refresh calls succeeded and so the user should remain logged in.

Platform

  • Device: Desktop
  • OS: macOs
  • Chrome Version 131.0.6778.86 (Official Build) (arm64)

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

@sachams sachams added the bug Something isn't working label Nov 22, 2024
@sachams
Copy link
Author

sachams commented Nov 24, 2024

@JakeLo123 @alex-fusionauth have you noticed any similar problems with isLoggedIn in the latest verison?

@JakeLo123
Copy link
Collaborator

Can't say I have, although I've not used the package on a regular basis since the last version.

@sachams
Copy link
Author

sachams commented Dec 1, 2024

OK cool, thanks anyway! @alex-fusionauth have you seen this issue before?

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
None yet
Development

No branches or pull requests

2 participants