Skip to content

feat(shared): add ChatGPT OAuth provider type - #10107

Merged
brkalow merged 4 commits into
mainfrom
feat/chatgpt-oauth-provider
Nov 18, 2026
Merged

brkalow merged 4 commits into
mainfrom
feat/chatgpt-oauth-provider

Conversation

@brkalow

@brkalow brkalow commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Description

Clerk's backend is adding Sign in with ChatGPT as a built-in social connection (oauth_chatgpt, clerk_go#22875), but @clerk/shared doesn't know the provider. SDK types reject the strategy, and the provider catalog has no name or icon metadata for it, so apps and the Dashboard can't render or type a ChatGPT connection.

This adds chatgpt / oauth_chatgpt to the OAuth provider union and the provider catalog, with a patch changeset. The union only grows, so the change is non-breaking. Nothing renders until an instance has the backend chatgpt_oauth flag on and its own OpenAI client configured.

How to test: pnpm --filter @clerk/shared test (includes the provider-sorting case for ChatGPT). It passed (1396 tests) on the stacked UI branch, which contains this change. The end-to-end flow is exercised by the stacked UI PR javascript#10172.

Related: clerk_go#22875, dashboard#10380. Part of AIE-1801.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected (not run on this branch alone; the stacked UI branch builds).
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ea69fb8

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

This PR includes changesets to release 23 packages
Name Type
@clerk/shared Patch
@clerk/ui Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/electron Patch
@clerk/expo-passkeys Patch
@clerk/expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/localizations Patch
@clerk/mosaic Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/swingset Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/vue 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

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 17, 2026 11:24pm UTC
mosaic-docs Error Error Nov 17, 2026 11:24pm UTC
swingset Ready Ready Preview Nov 17, 2026 11:24pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bbcd971 and ea69fb8.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The shared OAuth provider type and registry now include ChatGPT, with the oauth_chatgpt strategy and its documentation URL. The UI provider list includes chatgpt, and the default strategy test expectation includes oauth_chatgpt. A changeset declares patch releases for @clerk/shared and @clerk/ui.

Estimated code review effort: 2 (Simple) | ~8 minutes

Suggested reviewers: kalafut, alexcarpenter

Merge Risk: Minimal · previous review bbcd9

This adds ChatGPT as a supported OAuth provider in the shared types and registry and routes its logo through the monochrome icon treatment. No concrete defect was found, and the change is additive and low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: adding a ChatGPT OAuth provider type in @clerk/shared. The changeset also covers the provider catalog and UI icon support, which the title does not mention, but the ti…
Description check Passed The description explains that @clerk/shared lacks the chatgpt and oauth_chatgpt provider, and that this PR adds them to the OAuth union and provider catalog with a patch changeset. It also gives test …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adding a ChatGPT OAuth provider type in @clerk/shared. The changeset also covers the provider catalog and UI icon support, which the title does not mention, but the title is still related to the main change.

Full details: Description check

Explanation

The description explains that @clerk/shared lacks the chatgpt and oauth_chatgpt provider, and that this PR adds them to the OAuth union and provider catalog with a patch changeset. It also gives test steps and related PRs, so it is directly related to the changeset.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a76eb84 and bbcd971.

Files selected for processing: 2

  • .changeset/chatgpt-oauth-provider.md
  • packages/ui/src/common/ProviderIcon.tsx
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 9 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

@pkg-pr-new

pkg-pr-new Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10107

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10107

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10107

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10107

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10107

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10107

@clerk/localizations

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

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10107

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10107

@clerk/upgrade

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

@clerk/vue

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

commit: ea69fb8

@alexcarpenter alexcarpenter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will want to add to supports mask image list here

export const SUPPORTS_MASK_IMAGE = ['agentid', 'apple', 'github', 'okta', 'okx_wallet', 'vercel', 'x'] as const;

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-11-17T23:25:45.153Z

Summary

Metric Count
Packages analyzed 20
Packages with changes 1
🔴 Breaking changes 0
🟡 Non-breaking changes 1
🟢 Additions 1

🤖 This report was reviewed by claude-sonnet-4-6.


@clerk/shared

Current version: 4.46.0
Recommended bump: MINOR → 4.47.0

Subpath ./types

🟡 Non-breaking Changes (1)

Modified: OAuthProvider
- type OAuthProvider = FacebookOauthProvider | GoogleOauthProvider | HubspotOauthProvider | GithubOauthProvider | TiktokOauthProvider | GitlabOauthProvider | DiscordOauthProvider | TwitterOauthProvider | TwitchOauthProvider | LinkedinOauthProvider | LinkedinOIDCOauthProvider | DropboxOauthProvider | AtlassianOauthProvider | BitbucketOauthProvider | MicrosoftOauthProvider | NotionOauthProvider | AppleOauthProvider | LineOauthProvider | InstagramOauthProvider | CoinbaseOauthProvider | SpotifyOauthProvider | XeroOauthProvider | BoxOauthProvider | SlackOauthProvider | LinearOauthProvider | XOauthProvider | EnstallOauthProvider | HuggingfaceOAuthProvider | VercelOauthProvider | AgentIDOauthProvider | CustomOauthProvider;
+ type OAuthProvider = FacebookOauthProvider | GoogleOauthProvider | HubspotOauthProvider | GithubOauthProvider | TiktokOauthProvider | GitlabOauthProvider | DiscordOauthProvider | TwitterOauthProvider | TwitchOauthProvider | LinkedinOauthProvider | LinkedinOIDCOauthProvider | DropboxOauthProvider | AtlassianOauthProvider | BitbucketOauthProvider | MicrosoftOauthProvider | NotionOauthProvider | AppleOauthProvider | LineOauthProvider | InstagramOauthProvider | CoinbaseOauthProvider | SpotifyOauthProvider | XeroOauthProvider | BoxOauthProvider | SlackOauthProvider | LinearOauthProvider | XOauthProvider | EnstallOauthProvider | HuggingfaceOAuthProvider | VercelOauthProvider | AgentIDOauthProvider | ChatGPTOauthProvider | CustomOauthProvider;

Static analyzer: Breaking change in type alias OAuthProvider: Type changed: import("@clerk/shared").AgentIDOauthProvider|import("@clerk/shared").AppleOauthProvider|import("@clerk/shared").Atlassi… → import("@clerk/shared").AgentIDOauthProvider|import("@clerk/shared").AppleOauthProvider|import("@clerk/shared").Atlassi…

🤖 AI review (reclassified as non-breaking) (95%): The change adds a new literal variant ChatGPTOauthProvider ('chatgpt') to the OAuthProvider union; no existing variant is removed or renamed. Union widening in an input position (e.g. additionalOAuthScopes key, getOAuthProviderData parameter) is non-breaking for callers because values they already pass still satisfy the type, and in output positions (e.g. ExternalAccountResource.provider) the new variant is an addition that well-typed consumers handle as an unexpected-but-valid value only if they exhaustively switch — but OAuthProvider is a large open union already including CustomOauthProvider, so exhaustive handling is not expected.

🟢 Additions (1)

Added: ChatGPTOauthProvider
+ type ChatGPTOauthProvider = 'chatgpt';

Added type alias ChatGPTOauthProvider


Report generated by Break Check

Last ran on ea69fb8.

The ChatGPT logo is monochrome, so render it through the mask image like
the other single-color logos (Apple, GitHub, Vercel, X). Without the mask
the black logo is unreadable in dark themes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brkalow

brkalow commented Nov 17, 2026

Copy link
Copy Markdown
Member Author

@alexcarpenter Added chatgpt to SUPPORTS_MASK_IMAGE in bbcd971, so the monochrome logo now picks up the theme foreground color like Apple, GitHub and Vercel. Also added @clerk/ui to the changeset.

@blacksmith-sh

blacksmith-sh Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Matches ChatGPT provider recognized in shared

Same on the new head. Before, 'oauth_chatgpt' fails typechecking and the catalog has no ChatGPT entry. After, it typechecks, the catalog returns ChatGPT, and ChatGPT sorts between Apple and GitHub.

Merge-base

Shared types and catalog

This PR bbcd971c

Shared types and catalog

Also checked · 1 match

Matches ChatGPT icon tinted by theme

Caution

New issue found while testing

ChatGPT icon asset missing on Clerk CDN

https://img.clerk.com/static/chatgpt.svg returns 404, so with the real asset the ChatGPT sign-in button shows an empty icon in every theme.

Proof on bbcd971c (from a76eb848) · mocked: Clerk Frontend API (setting chatgpt_oauth) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

@brkalow
brkalow enabled auto-merge (squash) November 18, 2026 00:18
@brkalow
brkalow disabled auto-merge November 18, 2026 02:34
@brkalow
brkalow merged commit c71b7d3 into main Nov 18, 2026
135 of 139 checks passed
@brkalow
brkalow deleted the feat/chatgpt-oauth-provider branch November 18, 2026 02:35

This branch was successfully deployed

2 active deployments
Preview – swingset — ea69fb84 Deployed Nov 17, 2026 by vercel[bot]
Preview – clerk-js-sandbox — ea69fb84 Deployed Nov 17, 2026 by vercel[bot]
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.

3 participants