feat(oauth): add Click Up OAuth provider#151
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 44 minutes and 50 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 PR adds ClickUp as a new built-in OAuth provider to Aura Auth. It includes the ClickUp provider module implementation, integration into the OAuth registry, comprehensive documentation, and a changelog entry. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
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: 5
🤖 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/click-up.mdx`:
- Around line 39-40: Update the ClickUp docs instruction to require the full
OAuth callback URL (including scheme and path) that Aura will send as
redirect_uri; specifically replace the example `localhost:3000` with a complete
callback such as `http://localhost:3000/auth/callback/click-up` and note to swap
in your production domain (e.g.,
`https://yourdomain.com/auth/callback/click-up`) so ClickUp will not reject the
OAuth redirect due to a URI mismatch.
- Around line 111-123: The ClickUp OAuth example includes an unsupported "scope"
parameter; update the example using the clickUp factory so the authorize.params
object does not include "scope" (remove the scope entry under clickUp({
authorize: { params: { ... } } })) and leave only supported keys
(client_id/redirect_uri/state) in the authorize params; ensure the createAuth
usage and clickUp(...) call remain otherwise unchanged so docs reflect ClickUp's
actual authorization URL parameters.
In `@packages/core/CHANGELOG.md`:
- Line 13: Update the changelog entry that currently reads `Click UP` to use the
official casing `ClickUp`; locate the line containing the string `Click UP` (the
entry "- Added the `Click UP` OAuth provider...") and replace it with `ClickUp`
so the changelog matches the rest of the PR.
In `@packages/core/src/oauth/click-up.ts`:
- Around line 6-43: ClickUp's user.id is returned as a number but the code types
it as string and assigns it directly to the UserIdentity.sub (must be string);
update the ClickUpProfile interface so user.id is number (not string) and in the
clickUp provider's profile mapping (profile => {...}) coerce the id with
String(profile.user.id) when setting sub (leave other fields as-is) to match the
pattern used in gitlab.ts/github.ts.
In `@packages/core/src/oauth/index.ts`:
- Line 58: The built-in provider is registered as clickUp but must be available
under the public "click-up" key and use the documented env names; update the
builtInOAuthProviders map so the entry key is "click-up" (not clickUp) and
adjust the provider factory (the BuiltInOAuthProvider implementation for
ClickUp) to read CLICK_UP_CLIENT_ID and CLICK_UP_CLIENT_SECRET (and CLICK_UP_*
env names used elsewhere) so oauth: ["click-up"] resolves correctly and the
correct env vars are loaded.
🪄 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: 4636eed8-3c87-48de-9b62-c59a6f5a8ad8
📒 Files selected for processing (5)
docs/src/content/docs/oauth/click-up.mdxpackages/core/CHANGELOG.mdpackages/core/src/actions/callback/access-token.tspackages/core/src/oauth/click-up.tspackages/core/src/oauth/index.ts
💤 Files with no reviewable changes (1)
- packages/core/src/actions/callback/access-token.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
Chores