fix: Pass initialized session to verifyMiddleware#742
Merged
thostetler merged 1 commit intoadsabs:masterfrom Dec 19, 2025
Merged
fix: Pass initialized session to verifyMiddleware#742thostetler merged 1 commit intoadsabs:masterfrom
thostetler merged 1 commit intoadsabs:masterfrom
Conversation
- verifyMiddleware was creating a new session instance instead of reusing the initialized one - This caused a race condition where the verify endpoint couldn't access the token - Session is now passed as a parameter, consistent with legacyAppDetectionMiddleware pattern - Eliminates redundant session decryption (~10-20ms per request)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #742 +/- ##
========================================
+ Coverage 72.3% 72.3% +0.1%
========================================
Files 221 220 -1
Lines 24803 24752 -51
Branches 1463 1462 -1
========================================
- Hits 17929 17894 -35
+ Misses 6833 6817 -16
Partials 41 41
🚀 New features to boost your workflow:
|
shinyichen
approved these changes
Dec 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
verifyMiddleware created a new session instance instead of reusing the initialized one, this caused a race condition where verify endpoints couldn't access the token
Solution
Testing
This was affecting the verify workflow