Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughValidation for provider scope and access-token gating for shared OAuth providers was centralized and enforced earlier in the authorize flow and via a new helper, removing environment-based conditionals. Changes
Sequence Diagram(s)(Skipped — changes are not presented as a multi-component sequential flow that requires a diagram.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Greptile SummaryThis PR fixes two related bugs in the shared-OAuth-key enforcement logic. First, the Confidence Score: 5/5Safe to merge — all three changes are targeted correctness fixes with no side effects on non-shared providers. All findings are P2 or lower. The changes are small, well-scoped, and correctly fix two distinct bypasses in shared-OAuth enforcement. No new behaviour is introduced for projects using their own OAuth keys. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant AuthorizeRoute as /oauth/authorize
participant AccessTokenRoute as /connected-accounts/.../access-token
Note over AuthorizeRoute: BEFORE: provider_scope check only inside if(token) block
Note over AuthorizeRoute: AFTER: provider_scope check runs for ALL flows
Client->>AuthorizeRoute: GET ?provider_scope=X (no token)
AuthorizeRoute->>AuthorizeRoute: Check provider.isShared && provider_scope
AuthorizeRoute-->>Client: OAuthExtraScopeNotAvailableWithSharedOAuthKeys (now fixed)
Note over AccessTokenRoute: BEFORE: shared-key guard skipped in production
Note over AccessTokenRoute: AFTER: guard applies in all environments
Client->>AccessTokenRoute: POST (shared provider, production env)
AccessTokenRoute->>AccessTokenRoute: provider.isShared && env var != true
AccessTokenRoute-->>Client: OAuthAccessTokenNotAvailableWithSharedOAuthKeys (now fixed)
Reviews (1): Last reviewed commit: "fix connected accounts tokens" | Re-trigger Greptile |
Summary by CodeRabbit