Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chatgpt-oauth-provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/shared": patch
---

Add ChatGPT as a supported OAuth provider strategy for instances where Sign in with ChatGPT is enabled.
6 changes: 6 additions & 0 deletions packages/shared/src/oauth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import type { OAuthProvider, OAuthProviderData, OAuthStrategy } from './types';

export const OAUTH_PROVIDERS: OAuthProviderData[] = [
{
provider: 'chatgpt',
strategy: 'oauth_chatgpt',
name: 'ChatGPT',
docsUrl: 'https://developers.openai.com/siwc/website',
},
{
provider: 'google',
strategy: 'oauth_google',
Expand Down
3 changes: 3 additions & 0 deletions packages/shared/src/types/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export type VercelOauthProvider = 'vercel';
/** @inline */
export type AgentIDOauthProvider = 'agentid';
/** @inline */
export type ChatGPTOauthProvider = 'chatgpt';
/** @inline */
export type CustomOauthProvider = `custom_${string}`;

/** Represents the available OAuth providers. */
Expand Down Expand Up @@ -104,4 +106,5 @@ export type OAuthProvider =
| HuggingfaceOAuthProvider
| VercelOauthProvider
| AgentIDOauthProvider
| ChatGPTOauthProvider
| CustomOauthProvider;
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('useEnabledThirdPartyProviders', () => {
'oauth_atlassian',
'oauth_bitbucket',
'oauth_box',
'oauth_chatgpt',
'oauth_coinbase',
'oauth_discord',
'oauth_dropbox',
Expand Down
Loading