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: Hydra OAuth Token invalid when server is reset #568

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

jonas-martinez
Copy link
Collaborator

@jonas-martinez jonas-martinez commented Apr 11, 2024

About this PR

Very closely linked to lenra-io/devtool#210

Technical highlight/advice

Do not return errors when the oauth token is invalid, just redirect to the register page as we don't know what could have caused the issue. It is better to get a new token than trying to fix an unfixable data corruption.

How to test my changes

Please see @taorepoara comments on lenra-io/devtool#210 for testing instructions. You basically need to start a server, register and connect. Then you need to reset the server and try to log in back into it with the same old oauth token. It should redirect you to the register page.

Before my change it just showed an error.

Checklist

  • I didn't over-scope my PR
  • My PR title matches the commit convention
  • I did not include breaking changes
  • I made my own code-review before requesting one

I included unit tests that cover my changes

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

I added/updated the documentation about my changes

  • 📜 README.md
  • 📕 docs/*.md
  • 📓 docs.lenra.io
  • 🙅 no documentation needed

@jonas-martinez jonas-martinez added the bug Something isn't working label Apr 11, 2024
@jonas-martinez jonas-martinez self-assigned this Apr 11, 2024
@taorepoara
Copy link
Member

I'll look at the devtool to see if the problem is linked even if the workflow is not the same

@taorepoara taorepoara merged commit fc2e3fd into main Apr 12, 2024
25 of 28 checks passed
@taorepoara taorepoara deleted the fix-hydra-token-not-valid branch April 12, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants