-
Notifications
You must be signed in to change notification settings - Fork 435
fix: make sure beforeSessionSaved hook gets the updated token after refresh
#2387
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
Conversation
…ing finalizeSession
accessToken before calling finalizeSession
|
@claude please review this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2387 +/- ##
==========================================
+ Coverage 87.61% 87.65% +0.04%
==========================================
Files 37 37
Lines 4086 4084 -2
Branches 809 809
==========================================
Hits 3580 3580
+ Misses 503 501 -2
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Claude finished @tusharpandey13's task —— View job PR Review
Overall Assessment✅ This PR is ready to be merged. The fix correctly addresses a bug where What was fixed:
Changes reviewed:
|
accessToken before calling finalizeSessionbeforeSessionSaved hook gets the updated token after refresh
Fixes: #2370
beforeSessionSavedwas not provided with the updated access token ingetAccessToken()andconnectAccount(), leading to it operating on stale AT.Changes
auth-client.ts: mergedsessionChangeswith existingsessionand THEN passed tofinalizeSession(this callsbeforeSessionSaved)beforeSessionSaved-token-refresh-flow.test.ts: added flow test cases that ensure thatbeforeSessionSavedis called with updated tokens after token refresh.References
Tests
PASSING