feat(oauth): add Dribble OAuth provider#153
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 39 minutes and 35 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis pull request adds support for Dribble as a new OAuth provider to the Aura Stack authentication system. It includes the Dribble provider implementation with TypeScript interfaces, a provider factory configuration, documentation for setup and usage, and integration into the existing OAuth provider registry. Changes
Possibly related PRs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
packages/core/src/oauth/dribble.ts (1)
59-64: Normalize nullableundefinedfor consistency.
DribbleProfile.emailisstring | null, but theUserIdentityschema treatsgithubprovider explicitly normalizes withprofile.email ?? undefined. Aligning here keeps the user shape consistent across providers and avoids surprising downstream consumers that distinguishnullfromundefined.♻️ Proposed change
return { sub: String(profile.id), name: profile.name, image: profile.avatar_url, - email: profile.email, + email: profile.email ?? undefined, } as DefaultUser🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/oauth/dribble.ts` around lines 59 - 64, The returned DefaultUser currently assigns profile.email which is DribbleProfile.email (string | null); normalize nullable emails to undefined to match other providers and the UserIdentity schema by replacing the raw assignment with a normalized value (e.g., use profile.email ?? undefined) in the object returned from the function that builds the DefaultUser (the block returning { sub: String(profile.id), name: profile.name, image: profile.avatar_url, email: ... }).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/src/content/docs/oauth/dribble.mdx`:
- Around line 1-4: The frontmatter description string is ungrammatical; update
the page metadata `description` in dribble.mdx (the YAML frontmatter
`description` field) to a correct sentence such as "Add Dribble authorization
provider to Aura Auth for authentication and authorization" or another concise
equivalent, preserving capitalization and punctuation.
- Around line 36-42: Replace the outdated step-by-step Dribbble OAuth
registration instructions (remove references to "Settings > Applications" and
the "Register a new application" button) with a concise note linking to
Dribbble's official developer portal (https://developer.dribbble.com/) and
specifying the required callback URL format (e.g., keep the example callback
`http://localhost:3000/auth/callback/dribble` but instruct to replace with
production domain), and update the text to state that Client ID and Client
Secret are generated and shown immediately upon registration (no separate
"Generate a new client secret" step); ensure the link and corrected phrases
replace the existing numbered steps in the Dribble OAuth doc.
In `@packages/core/src/oauth/dribble.ts`:
- Around line 57-65: Remove the debug console.log in the Dribble provider's
profile mapper so PII isn't written to stdout: in
packages/core/src/oauth/dribble.ts inside the profile: (profile) => { ... }
callback delete the line console.log("Dribble profile", profile) (or replace it
with a non-PII debug signal if you have a centralized logger), and return the
sanitized DefaultUser object exactly as constructed by sub/name/image/email in
the profile function.
- Around line 6-67: Provider and identifiers are misspelled as "Dribble" (two
b's); rename to the correct "Dribbble" (three b's) and update all references and
docs. Rename the file dribble.ts → dribbble.ts and update the exported const
name dribble → dribbble and its id/name fields (id: "dribbble", name:
"Dribbble"); rename interfaces DribbleDefault/DribbleTeams/DribbleProfile →
DribbbleDefault/DribbbleTeams/DribbbleProfile and update any usages. Update
imports/exports and registry key in oauth index (references to dribble) and
adjust docs/examples (docs/oauth/dribble.mdx) including oauth array entries,
callback paths (/auth/callback/dribbble), and generated env var prefixes
(AURA_AUTH_DRIBBBLE_CLIENT_ID/SECRET). Ensure tests/build references are updated
to the new identifiers and file name.
---
Nitpick comments:
In `@packages/core/src/oauth/dribble.ts`:
- Around line 59-64: The returned DefaultUser currently assigns profile.email
which is DribbleProfile.email (string | null); normalize nullable emails to
undefined to match other providers and the UserIdentity schema by replacing the
raw assignment with a normalized value (e.g., use profile.email ?? undefined) in
the object returned from the function that builds the DefaultUser (the block
returning { sub: String(profile.id), name: profile.name, image:
profile.avatar_url, email: ... }).
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 758aa29e-98f9-4c41-8755-b2e7620faf5e
📒 Files selected for processing (3)
docs/src/content/docs/oauth/dribble.mdxpackages/core/src/oauth/dribble.tspackages/core/src/oauth/index.ts
Description
This pull request adds the
AtlassianOAuth provider to the list of supported OAuth integrations in the Aura Auth library.With this addition, Aura Auth now supports seven OAuth providers:
GitHub,Bitbucket,Figma,Discord,GitLab,Spotify,X,StravaandAtlassianUsage
Summary by CodeRabbit
New Features
Documentation