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

Catanie data set cache and logged in status are out of sync #807

Closed
dylanmcreynolds opened this issue Jul 23, 2021 · 3 comments
Closed

Catanie data set cache and logged in status are out of sync #807

dylanmcreynolds opened this issue Jul 23, 2021 · 3 comments
Labels

Comments

@dylanmcreynolds
Copy link
Contributor

dylanmcreynolds commented Jul 23, 2021

Dataset cached in localStorage (I assume) while login does not

Summary

If you close the browser without logging out, then reopen the browser, you will see that you are not logged in, but you can see data sets that are private to the last logged-in user.

Steps to Reproduce

  1. Log into Catanie
  2. Close the browser window
  3. Re-open the browser window
  4. Navigate back to Catanie

Observe that Catanie does not think that you're logged in, but you can see private data sets.

Expected Behaviour

I am not sure if the expected behavior is that you should continue to be logged in after closing the window (user token stored in localStorage) or not. I suspect the expected behavior is that you would continue to be logged in until you click "Logout". But if this is the expected behavior, then catanie should detect that the user is logged out and not present private datasets.

marcoleorato added a commit to marcoleorato/catanie that referenced this issue Aug 18, 2021
…ween "", /anonymous and /login instead of all on "".

This also make is so that if you are logged in you get the /datasets page instead of /anonymous/datasets when opening the site solving issue SciCatProject#807.
Updated the login to use the returnUrl again instead of always sending to /datasets.
Updated the logout effect to send you to /anonymous which is the logged out site and redirect you to /anonymous/datasets.
marcoleorato added a commit to marcoleorato/catanie that referenced this issue Aug 18, 2021
…ween "", /anonymous and /login instead of all on "".

This also make is so that if you are logged in you get the /datasets page instead of /anonymous/datasets when opening the site solving issue SciCatProject#807.
Updated the login to use the returnUrl again instead of always sending to /datasets.
Updated the logout effect to send you to /anonymous which is the logged out site and redirect you to /anonymous/datasets.

This also remove the Anonymous from the breadcrumb, which led to a 404 error.
@bolmsten bolmsten added the bug label Sep 21, 2021
@nitrosx
Copy link
Contributor

nitrosx commented Mar 29, 2022

Just tested and I was not able to reproduce the problem.
I will try to wait a longer time between closing the tab and reopening scicat

@dylanmcreynolds
Copy link
Contributor Author

This appears fixed to me, too. Now you stay logged in and see your datasets when you navigate back to frontend (step 4 of my steps above.)

OK by me to close. Thanks for the fix @marcoleorato !

@nitrosx
Copy link
Contributor

nitrosx commented Mar 29, 2022

Closing this ticket as the issue appears to be solved and it has been tested by 2 people

@nitrosx nitrosx closed this as completed Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants