Skip to content

Conversation

@Railly
Copy link

@Railly Railly commented Nov 26, 2025

Summary

  • Add VercelOauthProvider type ('vercel')
  • Add VercelOauthProvider to the OAuthProvider union type

This enables oauth_vercel as a valid OAuthStrategy for the new "Sign in with Vercel" feature.

Test plan

  • Types build successfully
  • Dashboard can import and use the new type

Summary by CodeRabbit

  • New Features

    • Added "Sign in with Vercel" as an OAuth login option so users can authenticate with their Vercel accounts.
  • Chores

    • Minor package version bump and updates to reflect the new authentication option.

✏️ Tip: You can customize this high-level summary in your review settings.

Add VercelOauthProvider type to support "Sign in with Vercel" OAuth flow.
@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

🦋 Changeset detected

Latest commit: 7af4178

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 22 packages
Name Type
@clerk/shared Minor
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/elements Patch
@clerk/expo-passkeys Patch
@clerk/clerk-expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/types Patch
@clerk/vue Patch
@clerk/localizations Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Nov 28, 2025 6:16pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Added a new Vercel OAuth provider: a VercelOauthProvider type and 'vercel' union member, the provider entry in runtime provider data, a test update to include the new provider, and a changeset documenting a minor version bump.

Changes

Cohort / File(s) Summary
OAuth type update
packages/shared/src/types/oauth.ts
Added VercelOauthProvider type and extended the exported OAuthProvider union to include 'vercel'.
Runtime provider data
packages/shared/src/oauth.ts
Appended a new OAUTH_PROVIDERS entry for Vercel (provider, strategy, name, docsUrl).
Tests updated
packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
Updated expected OAuth strategies list to include the new oauth_vercel provider in default/sorted expectations.
Release metadata
.changeset/dull-squids-admire.md
Added a changeset describing a minor version bump for @clerk/shared and documenting the new vercel OAuth provider in public types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Check downstream type usages and public API typing consumers for assumptions about allowed OAuthProvider values.
  • Verify provider metadata fields (strategy, docsUrl) follow existing conventions and localization/labeling patterns.
  • Confirm tests reflect intended ordering/filtering logic and no other tests rely on a fixed provider list.

Poem

🐰 I hopped a branch to add a key,
A tiny "vercel" — now we’re three,
Small nibble of code, a joyful cheer,
Hop, build, deploy — carrots near! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(types): Add Vercel to OAuthProvider type' directly and clearly summarizes the main change: adding Vercel support to the OAuthProvider type definition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch railly/vercel-oauth-types

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 4931571 and 7af4178.

📒 Files selected for processing (2)
  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx (1 hunks)
  • packages/shared/src/oauth.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (15)
packages/clerk-js/src/ui/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/clerk-js-ui.mdc)

packages/clerk-js/src/ui/**/*.{ts,tsx}: Element descriptors should be written in camelCase
Use useCardState for card-level state management
Use useFormState for form-level state management
Use useLoadingStatus for managing loading states
Use useFormControl hook for form field state management with validation and localization support
All rendered values must be localized using useLocalizations hook - hard coded values are not allowed
Use localizationKeys for translating UI text with support for parameters and error messages
Use handleError utility for API error handling and provide field states for proper error mapping
Use the styled system sx prop with theme tokens for custom styling instead of inline styles
Use the Card component pattern with Card.Root, Card.Header, Card.Title, Card.Content, and Card.Footer for consistent card layouts
Use FormContainer with headerTitle and headerSubtitle localization keys combined with Form.Root and FormButtons for consistent form layouts
When form submission occurs, manage loading and error states by calling status.setLoading(), card.setLoading(), and card.setError() appropriately

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

All code must pass ESLint checks with the project's configuration

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
  • packages/shared/src/oauth.ts
**/*.{js,jsx,ts,tsx,json,md,yml,yaml}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
  • packages/shared/src/oauth.ts
packages/**/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
  • packages/shared/src/oauth.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Follow established naming conventions (PascalCase for components, camelCase for variables)

Prefer importing types from @clerk/shared/types instead of the deprecated @clerk/types alias

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
  • packages/shared/src/oauth.ts
packages/**/src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

packages/**/src/**/*.{ts,tsx,js,jsx}: Maintain comprehensive JSDoc comments for public APIs
Use tree-shaking friendly exports
Validate all inputs and sanitize outputs
All public APIs must be documented with JSDoc
Use dynamic imports for optional features
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Implement proper logging with different levels

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
  • packages/shared/src/oauth.ts
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.{test,spec}.{ts,tsx,js,jsx}: Unit tests are required for all new functionality
Verify proper error handling and edge cases
Include tests for all new features

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
**/*.ts?(x)

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
  • packages/shared/src/oauth.ts
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.tsx: Use error boundaries in React components
Minimize re-renders in React components

**/*.tsx: Use proper type definitions for props and state in React components
Leverage TypeScript's type inference where possible in React components
Use proper event types for handlers in React components
Implement proper generic types for reusable React components
Use proper type guards for conditional rendering in React components

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
**/*.{test,spec,e2e}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use real Clerk instances for integration tests

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
**/*.{md,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Update documentation for API changes

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
**/*.test.tsx

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use React Testing Library for component testing

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{jsx,tsx}: Always use functional components with hooks instead of class components
Follow PascalCase naming for components (e.g., UserProfile, NavigationMenu)
Keep components focused on a single responsibility - split large components
Limit component size to 150-200 lines; extract logic into custom hooks
Use composition over inheritance - prefer smaller, composable components
Export components as named exports for better tree-shaking
One component per file with matching filename and component name
Separate UI components from business logic components
Use useState for simple state management in React components
Use useReducer for complex state logic in React components
Implement proper state initialization in React components
Use proper state updates with callbacks in React components
Implement proper state cleanup in React components
Use Context API for theme/authentication state management
Implement proper state persistence in React applications
Use React.memo for expensive components
Implement proper useCallback for handlers in React components
Use proper useMemo for expensive computations in React components
Implement proper virtualization for lists in React components
Use proper code splitting with React.lazy in React applications
Implement proper cleanup in useEffect hooks
Use proper refs for DOM access in React components
Implement proper event listener cleanup in React components
Use proper abort controllers for fetch in React components
Implement proper subscription cleanup in React components
Use proper HTML elements for semantic HTML in React components
Implement proper ARIA attributes for accessibility in React components
Use proper heading hierarchy in React components
Implement proper form labels in React components
Use proper button types in React components
Implement proper focus management for keyboard navigation in React components
Use proper keyboard shortcuts in React components
Implement proper tab order in React components
Use proper ...

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
**/*.{test,spec}.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{test,spec}.{jsx,tsx}: Use React Testing Library for unit testing React components
Test component behavior, not implementation details
Use proper test queries in React Testing Library tests
Implement proper test isolation in React component tests
Use proper test coverage in React component tests
Test component interactions in integration tests
Use proper test data in React component tests
Implement proper test setup in React component tests
Use proper test cleanup in React component tests
Implement proper test assertions in React component tests
Use proper test structure for React component tests

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/typescript.mdc)

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Implement type guards for unknown types using the pattern function isType(value: unknown): value is Type
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details in classes
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Use mixins for shared behavior across unrelated classes in TypeScript
Use generic constraints with bounded type parameters like <T extends { id: string }>
Use utility types like Omit, Partial, and Pick for data transformation instead of manual type construction
Use discriminated unions instead of boolean flags for state management and API responses
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation at the type level
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document functions with JSDoc comments including @param, @returns, @throws, and @example tags
Create custom error classes that extend Error for specific error types
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining (?.) and nullish coalescing (??) operators for safe property access
Let TypeScript infer obvious types to reduce verbosity
Use const assertions with as const for literal types
Use satisfies operator for type checking without widening types
Declare readonly arrays and objects for immutable data structures
Use spread operator and array spread for immutable updates instead of mutations
Use lazy loading for large types...

Files:

  • packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx
  • packages/shared/src/oauth.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
packages/shared/src/oauth.ts (1)

172-177: LGTM! Vercel provider data follows the established pattern.

The new Vercel OAuth provider entry is correctly structured and consistent with all existing providers.

Optionally, you may want to verify the documentation URL is live before this merges:

#!/bin/bash
# Verify the Vercel OAuth documentation URL is accessible
curl -s -o /dev/null -w "%{http_code}" https://clerk.com/docs/authentication/social-connections/vercel
packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx (1)

58-58: LGTM! Correctly placed in alphabetical order.

The oauth_vercel strategy is properly positioned between oauth_twitter and oauth_x in the expected sorted list.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 26, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7324

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7324

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7324

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7324

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7324

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7324

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@7324

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@7324

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7324

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7324

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7324

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7324

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7324

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7324

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@7324

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7324

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@7324

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7324

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7324

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7324

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@7324

@clerk/types

npm i https://pkg.pr.new/@clerk/types@7324

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7324

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7324

commit: 7af4178

@Railly
Copy link
Author

Railly commented Nov 28, 2025

All checks passed! @brkalow, I was missing the changeset entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants