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 the multiple petitions to /auth/refresh #232

Merged
merged 6 commits into from
Apr 16, 2024

Conversation

jjgancfer
Copy link
Contributor

This PR should fix the multiple petitions bug to /auth/refresh. Now:

  1. If the page detects the user is not logged but they have a refresh token, it will try to refresh.
  2. Once the process fails, axios will throw an error, which will be promptly catched and check if the error code is 403. If it is, it deletes the refresh token, so the process is no longer triggered.

Using this version, I am currently unable to reproduce the bug, but if someone manages to do it I will look into it again.

@jjgancfer jjgancfer added bug 🐛 Something isn't working frontend 👁️ Frontend issue labels Apr 15, 2024
@jjgancfer jjgancfer added this to the Final presentation milestone Apr 15, 2024
@jjgancfer jjgancfer self-assigned this Apr 15, 2024
Copy link

Copy link
Contributor

@sergiorodriguezgarcia sergiorodriguezgarcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can not reproduce the error as well, for me works correct, very good job!

@Toto-hitori Toto-hitori merged commit faa545c into develop Apr 16, 2024
2 checks passed
@jjgancfer jjgancfer deleted the fix/webapp/refresh-continuous branch April 16, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working frontend 👁️ Frontend issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants