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

Sometimes user faces authorisation issue even though they have access #2013

Closed
manjitapandey opened this issue Dec 20, 2024 · 4 comments
Closed
Labels
bug Something isn't working effort:low Likely a few hours frontend Related to frontend code priority:high Should be addressed as a priority

Comments

@manjitapandey
Copy link
Contributor

Describe the bug
Sometimes some endpoints randomly fails due to authorisation. The error msg says user is not authorised to do so. But after logging out and logging in again the issue is fixed. I have faced this issue in endpoints like project form update and getting organisation list during project creation.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'create project'
  2. Click on 'see the list of org not visible'
  3. Sign out and sign in again
  4. See the issue is fixed

Expected behavior
The user should be able to do specific task every time if they have access.

Additional context
I am still not able to get the pattern of this error. Its irregular but this may be due to authorisation issue.

@manjitapandey manjitapandey added the bug Something isn't working label Dec 20, 2024
@spwoodcock
Copy link
Member

Which server?

Think this was fixed on dev & I imagined we would release again before Christmas.

But as we will wait until after, either we cherry pick the fix to prod or wait for the new release 😃

@spwoodcock spwoodcock added priority:high Should be addressed as a priority frontend Related to frontend code effort:low Likely a few hours labels Dec 20, 2024
@Anuj-Gupta4
Copy link
Collaborator

It seems to work after rebuilding once locally.

@manjitapandey
Copy link
Contributor Author

Just faced the issue again. Is it due to cache or anything??
I can't see organisation list on dev server though i am admin
Image

@spwoodcock
Copy link
Member

spwoodcock commented Dec 24, 2024

Its due to cookie expiry after a time, unless you visit the page before the cookie expires and it's refreshed. So no visit in 3 days would cause expiry I think.

Solvable by automatically removing the frontend login state on first load, if the cookie / token is expired. I thought we had logic for this, but it should be checked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working effort:low Likely a few hours frontend Related to frontend code priority:high Should be addressed as a priority
Projects
Development

No branches or pull requests

3 participants