Fix OAuth error propagation - #56
Conversation
|
Warning Review limit reached
Next review available in: 52 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe JavaScript API now relays OAuth2 error assertions and returns callback redirect data. Shared callback handling logs failures and standardizes errors. The React sign-in component consumes redirect responses and clears related state. ChangesOAuth2 callback relay
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/javascript/src/api/executeEmbeddedSignInFlow.ts`:
- Around line 36-45: Narrow the headers parameters of postAuthCallback and
relayFailure to Record<string, string> | undefined instead of HeadersInit, so
their object spreads reliably preserve caller-provided headers. Keep the
callback request construction and existing header merging behavior unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 003e6f98-1dc9-4194-a0d9-333487da5000
📒 Files selected for processing (4)
packages/javascript/src/api/__tests__/executeEmbeddedSignInFlow.test.tspackages/javascript/src/api/executeEmbeddedSignInFlow.tspackages/javascript/src/models/embedded-signin-flow.tspackages/react/src/components/presentation/auth/SignIn/SignIn.tsx
bba005d to
417a769
Compare
There was a problem hiding this comment.
Lets check if this should go to other SDKs as well. ex:Vue and also check Mobile
There was a problem hiding this comment.
This is specifically related to our gate app behaviour. In that case it does not need to go to other SDKs AFAIU
Purpose
Currently, errors that occur during flow execution are not propagated back to the client in OAuth / CIBA initiated flows. This PR onboard the changes needed on the gate app to fix it.
Approach
Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit