-
Notifications
You must be signed in to change notification settings - Fork 8
feat: tightened the RefreshToken response type #175
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
WalkthroughReplaces the single Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
e4a17ac to
e1465ff
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
lib/types.ts (1)
255-261: Require all token fields in RefreshTokenResultSuccess
The refresh handler always returnsaccessToken,idToken, andrefreshTokenwhensuccess: true, so remove?from those properties in the interface.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
lib/types.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
lib/types.ts (1)
lib/main.ts (1)
StorageKeys(72-72)
🔇 Additional comments (2)
lib/types.ts (2)
247-253: Optional error field is intentional: keepingerror?: stringsupports cases without error messages (e.g., test mocks), so no change needed.
263-265: Discriminated union implementation is correct; confirm external callers checksuccess
Internal code only produces or forwards the union with no unsafe property access; since this is a breaking change, manually verify all external consumers checksuccessbefore accessing other properties.
Explain your changes
Update the RefreshTokenResult to be more explict on the data to be reponded with on success or failure
Checklist
🛟 If you need help, consider asking for advice over in the Kinde community.