htrc / torchlite-frontend

Torchlite web interface
https://torchlite-htrc.vercel.app
1 stars 0 forks source link

Widgets not getting displayed after the user is logged in for a while. #98

Open sandeep-ps opened 6 months ago

sandeep-ps commented 6 months ago

Description

The widgets are not getting displayed after the user stays logged in for a while.

Steps to Repeat:

  1. Login to TORCHLITE dashboard
  2. Keep the browser tab open for a while (definitely more than 30 mins)
  3. Revisit the tab and see that the widgets are not visible.
  4. Refresh the page.
  5. See that the widgets are still not visible.

Expected Behavior

If the user session is active, the widgets should be displayed. If the user session has expired, the user needs to be promoted to sign back in.

Additional Context

  1. GET api/auth/session endpoint is returning HTTP 200, but in the response hints on a token refresh error.
    {
    "user": {
        "name": "abc",
        "email": "xyz"
    },
    "expires": "2024-06-07T22:06:02.002Z",
    "sessionId": "<ID>",
    "error": "RefreshAccessTokenError"
    }
  2. GET /api/worksets endpoint returning HTTP 500 after the user is logged in for a while. We need to check if the token refresh is happening correctly.
  3. Look into extending the life of refresh tokens to keep the user active for longer time.
sandeep-ps commented 2 weeks ago

Tested this twice using the Stage instance and waited 35 minutes and 50 minutes (in the issue description it's more than 30 minutes), but I couldn't reproduce this bug. I will try once more with a longer duration (more than 1 hour), and report back.

jswatsch commented 1 week ago

@sandeep-ps will try a longer test now that the dev instance is working.

jswatsch commented 5 days ago

Will try once more today, but other tries were not reproducible.