-
-
Notifications
You must be signed in to change notification settings - Fork 2
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 JWT out-of-sync detection middleware and move it into LexQueries #1218
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
C# Unit Tests90 tests 90 ✅ 5s ⏱️ Results for commit 4147991. ♻️ This comment has been updated with latest results. |
d1d36ff
to
5db3179
Compare
5db3179
to
b597b52
Compare
This ensures our "middleware" can detect when the user was added to the project and stops hiding members on non-confidential projects
b597b52
to
a36419e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to fast track this as there's an open issue in production that it fixes.
Resolves #1180
This PR moves the JWT refreshing code into LexQueries.
It's no longer quite as generic as it was before (i.e. it won't automatically trigger based on GQL types), but it's much less magical, not so tricky to wire-up and easier to test.
The middleware was pretty buggy before. The unit tests should demonstrate that it handles every situation we're expecting our users to maybe land in.
Also, previously we used the old token for the scope of the request and only refreshed it at the end.
Now we look for updates up front and use the current state for the scope of the GQL Query.
Projecting a few Id's and UserId's lets us write less complicated code, so I thought it was worth it.