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

Fix frontend not redirecting on 401 #1244

Merged
merged 9 commits into from
Oct 4, 2023
Merged

Conversation

SuaYoo
Copy link
Member

@SuaYoo SuaYoo commented Oct 3, 2023

Resolves #1234

Changes

  • Ensures need-login event bubbles until handled
  • Redirects on 401 from /refresh endpoint
  • Go to previous URL upon login, rather than always to home page
  • Shows accurate login notification (rather than less precise "couldn't retrieve org" or similar message)

Screenshots

Page Image/video
Log in (notification on need login) Screenshot 2023-10-03 at 2 50 26 PM

@SuaYoo SuaYoo requested a review from ikreymer October 3, 2023 17:00
@SuaYoo SuaYoo marked this pull request as ready for review October 4, 2023 01:06
@ikreymer
Copy link
Member

ikreymer commented Oct 4, 2023

Hm, testing on localhost:9870 against dev, I've seen it get stuck on the spinner after logging in.
To repro:

  1. log in on localhost:9870, navigate to some page (eg. profiles)
  2. wait for log out
  3. return to tab, see instant redirect to login page
  4. Login again -> gets stuck on spinner on the login page
  5. Click button again and login and redirect to original page (eg. profiles)

@SuaYoo
Copy link
Member Author

SuaYoo commented Oct 4, 2023

Hm, testing on localhost:9870 against dev, I've seen it get stuck on the spinner after logging in.

Should be fixed now!

@ikreymer ikreymer merged commit f2261bc into main Oct 4, 2023
2 checks passed
@ikreymer ikreymer deleted the frontend-fix-backend-logout branch October 4, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Frontend doesn't redirect to login screen when backend logs out
2 participants