Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
674669e
feat(ui): display OIDC authorized redirect URI
NicolasLopes7 Jul 21, 2026
7b8a088
feat(ui): add OIDC claims configuration step
NicolasLopes7 Jul 21, 2026
069f908
feat(ui): add OIDC endpoint configuration step
NicolasLopes7 Jul 21, 2026
ae23318
feat(ui): save OIDC endpoints before credentials
NicolasLopes7 Jul 21, 2026
f8bbba8
feat(ui): add OIDC credentials configuration step
NicolasLopes7 Jul 22, 2026
b8a4067
fix(ui): align OIDC credentials configuration
NicolasLopes7 Jul 22, 2026
0f47940
fix(ui): use OIDC redirect URI from FAPI
NicolasLopes7 Jul 22, 2026
84e8714
fix(ui): show OIDC debug redirect URI
NicolasLopes7 Jul 22, 2026
0f9ef24
remove debug URI field
NicolasLopes7 Jul 23, 2026
eb3360e
refactor: move step into separate components rather than single-file
NicolasLopes7 Jul 23, 2026
67dc5cd
gymnastics
NicolasLopes7 Jul 23, 2026
af6b470
fix(ui): recognize custom OIDC provider keys
NicolasLopes7 Jul 23, 2026
5fc65c8
fix(ui): remove dead OIDC scopes control
NicolasLopes7 Jul 27, 2026
284c7ad
fix(ui): simplify OIDC setup flow
NicolasLopes7 Jul 28, 2026
b74a8c6
fix(ui): highlight OIDC token claims
NicolasLopes7 Jul 28, 2026
d25f3c0
fix(ui): separate OIDC token claims
NicolasLopes7 Jul 28, 2026
63d7c94
fix(ui): inline OIDC token claim guidance
NicolasLopes7 Jul 28, 2026
d546a93
fix(ui): show OIDC claims after redirect URI
NicolasLopes7 Jul 28, 2026
d39578c
fix(ui): address OIDC review feedback
NicolasLopes7 Jul 28, 2026
b41bc8d
chore(ui): merge OIDC self-serve configuration
NicolasLopes7 Jul 28, 2026
6ccc628
refactor(ui): simplify OIDC configuration
NicolasLopes7 Jul 28, 2026
87edea6
fix(ui): address OIDC configure feedback
NicolasLopes7 Jul 28, 2026
680de51
chore(ui): remove feedback changeset
NicolasLopes7 Jul 28, 2026
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
8 changes: 8 additions & 0 deletions packages/clerk-js/src/core/resources/EnterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,11 @@ function oauthConfigFromJSON(data: EnterpriseOAuthConfigJSON): EnterpriseOAuthCo
name: data.name,
clientId: data.client_id,
providerKey: data.provider_key,
redirectUri: data.redirect_uri,
discoveryUrl: data.discovery_url,
authUrl: data.auth_url,
tokenUrl: data.token_url,
userInfoUrl: data.user_info_url,
logoPublicUrl: data.logo_public_url,
requiresPkce: data.requires_pkce,
createdAt: unixEpochToDate(data.created_at),
Expand All@@ -73,7 +77,11 @@ function oauthConfigToJSON(data: EnterpriseOAuthConfigResource): EnterpriseOAuth
name: data.name,
client_id: data.clientId,
provider_key: data.providerKey,
redirect_uri: data.redirectUri,
discovery_url: data.discoveryUrl,
auth_url: data.authUrl,
token_url: data.tokenUrl,
user_info_url: data.userInfoUrl,
logo_public_url: data.logoPublicUrl,
requires_pkce: data.requiresPkce,
created_at: data.createdAt?.getTime() ?? 0,
Expand Down
58 changes: 55 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,18 +240,70 @@ export const enUS: LocalizationResource = {
},
},
oidcCustom: {
claimsStep: {
headerSubtitle: 'Set the claims your identity provider includes in the ID token',
},
credentialsStep: {
headerSubtitle: 'Add your application credentials',
clientId: {
label: 'Client ID',
placeholder: 'Paste client ID here...',
},
clientSecret: {
label: 'Client secret',
placeholder: 'Paste client secret here...',
},
paragraph: 'In your identity provider’s OIDC application, retrieve these values.',
},
endpointsStep: {
headerSubtitle: 'Add your identity provider’s endpoints',
discoveryUrl: {
description:
'In your identity provider’s OIDC application, retrieve the discovery endpoint. Paste it below.',
label: 'Discovery endpoint',
placeholder: 'Paste URL here...',
},
manual: {
authUrl: {
label: 'Authorization URL',
placeholder: 'Paste URL here...',
},
description: 'In your identity provider’s OIDC application, retrieve these values.',
tokenUrl: {
label: 'Token URL',
placeholder: 'Paste URL here...',
},
userInfoUrl: {
label: 'User Info URL',
placeholder: 'Paste URL here...',
},
},
modes: {
ariaLabel: 'OIDC endpoint configuration method',
discoveryUrl: 'Add via discovery endpoint',
manual: 'Configure manually',
},
},
mainHeaderTitle: 'Configure your identity provider',
redirectUriStep: {
headerSubtitle: 'Create a new OIDC application in your identity provider’s dashboard',
paragraph:
'In your identity provider’s dashboard, create a new OIDC application that supports the authorization code grant type, and use the following redirect URI:',
claims: {
description: 'Ensure your ID token includes the following claims:',
table: {
columns: {
attribute: 'Clerk attribute',
claim: 'ID token claim',
},
rows: {
email: { attribute: 'Primary email' },
firstName: { attribute: 'First name' },
lastName: { attribute: 'Last name' },
subject: { attribute: 'External user ID' },
},
},
},
redirectUri: {
label: 'Authorized redirect URI',
},
},
},
samlCustom: {
Expand Down
10 changes: 10 additions & 0 deletions packages/shared/src/types/elementIds.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,16 @@ export type FieldId =
| 'idpMetadata'
| 'idpMetadataUrl'
| 'idpSsoUrl'
| 'discoveryUrl'
| 'authUrl'
| 'tokenUrl'
| 'userInfoUrl'
| 'clientId'
| 'clientSecret'
| 'redirectUri'
| 'oidcClientId'
| 'oidcClientSecret'
| 'oidcRedirectUri'
| 'acsUrl'
| 'spEntityId'
| 'web3WalletName'
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/types/enterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,11 @@ export interface EnterpriseOAuthConfigJSON {
name: string;
provider_key?: string;
client_id: string;
redirect_uri?: string;
discovery_url?: string;
auth_url?: string;
token_url?: string;
user_info_url?: string;
logo_public_url?: string | null;
requires_pkce?: boolean;
created_at: number;
Expand All@@ -112,7 +116,11 @@ export interface EnterpriseOAuthConfigResource {
name: string;
clientId: string;
providerKey?: string;
redirectUri?: string;
discoveryUrl?: string;
authUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
logoPublicUrl?: string | null;
requiresPkce?: boolean;
createdAt: Date | null;
Expand Down
56 changes: 53 additions & 3 deletions packages/shared/src/types/localization.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -1529,15 +1529,65 @@ export type __internal_LocalizationResource = {
mainHeaderTitle: LocalizationValue;
redirectUriStep: {
headerSubtitle: LocalizationValue;
};
claimsStep: {
headerSubtitle: LocalizationValue;
paragraph: LocalizationValue;
claims: {
description: LocalizationValue;
table: {
columns: {
attribute: LocalizationValue;
claim: LocalizationValue;
};
rows: {
email: { attribute: LocalizationValue };
firstName: { attribute: LocalizationValue };
lastName: { attribute: LocalizationValue };
subject: { attribute: LocalizationValue };
};
};
};
redirectUri: {
label: LocalizationValue;
};
};
endpointsStep: {
headerSubtitle: LocalizationValue;
discoveryUrl: {
description: LocalizationValue;
label: LocalizationValue;
placeholder: LocalizationValue;
};
manual: {
authUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
description: LocalizationValue;
tokenUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
userInfoUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
};
modes: {
ariaLabel: LocalizationValue;
discoveryUrl: LocalizationValue;
manual: LocalizationValue;
};
};
credentialsStep: {
headerSubtitle: LocalizationValue;
clientId: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
clientSecret: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
paragraph: LocalizationValue;
};
};
unsupportedProvider: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@ import {
areAllOrganizationDomainsVerified,
connectionBackingEmail,
isEnterpriseConnectionConfigured,
isOidcProvider,
organizationEnterpriseConnection,
} from '../organizationEnterpriseConnection';

Expand DownExpand Up@@ -62,7 +61,7 @@ const fullyConfiguredSaml = makeSamlConnection({
const configuredOidc = makeOauthConfig({ clientId: 'client_abc' });

const makeOidcConnection = (overrides: Partial<EnterpriseConnectionResource> = {}): EnterpriseConnectionResource =>
makeConnection({ provider: 'oidc_custom', samlConnection: null, oauthConfig: configuredOidc, ...overrides });
makeConnection({ provider: 'oauth_custom_acme', samlConnection: null, oauthConfig: configuredOidc, ...overrides });

// Builds the entity with sensible defaults; each test overrides what it cares
// about.
Expand All@@ -75,18 +74,6 @@ const derive = (overrides: Partial<Parameters<typeof organizationEnterpriseConne
});

describe('organizationEnterpriseConnection', () => {
describe('isOidcProvider', () => {
it('recognizes OIDC provider keys with the oidc_ prefix', () => {
expect(isOidcProvider('oidc_custom')).toBe(true);
expect(isOidcProvider('oidc_clerk_dev')).toBe(true);
});

it('rejects malformed OIDC provider keys', () => {
expect(isOidcProvider('oidc')).toBe(false);
expect(isOidcProvider('oidcfoo')).toBe(false);
});
});

describe('hasConnection', () => {
it('undefined connection → false', () => {
expect(derive({ connection: undefined }).hasConnection).toBe(false);
Expand All@@ -106,8 +93,10 @@ describe('organizationEnterpriseConnection', () => {
it('connection → its provider', () => {
expect(derive({ connection: makeConnection({ provider: 'saml_custom' }) }).provider).toBe('saml_custom');
});
it('carries a derived OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oidc_clerk_dev' }) }).provider).toBe('oidc_clerk_dev');
it('carries a custom OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oauth_custom_clerk_dev' }) }).provider).toBe(
'oauth_custom_clerk_dev',
);
});
});

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import type {

import type { EnterpriseConnectionProviderType, OidcProviderType } from '../types';

export const isOidcProvider = (provider: string): provider is OidcProviderType => provider.startsWith('oidc_');
export const isOidcProvider = (provider: string): provider is OidcProviderType =>
provider.startsWith('oidc_') || provider.startsWith('oauth_custom_');

/**
* The email whose domain backs the connection: the user's primary address if
Expand DownExpand Up@@ -56,7 +57,6 @@ export const isEnterpriseConnectionConfigured = (
if (!connection) {
return false;
}
// OIDC exposes only the client ID on the resource; the secret and manual endpoints are write-only.
if (isOidcProvider(connection.provider)) {
return Boolean(connection.oauthConfig?.clientId);
}
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
674669e
feat(ui): display OIDC authorized redirect URI
NicolasLopes7 Jul 21, 2026
7b8a088
feat(ui): add OIDC claims configuration step
NicolasLopes7 Jul 21, 2026
069f908
feat(ui): add OIDC endpoint configuration step
NicolasLopes7 Jul 21, 2026
ae23318
feat(ui): save OIDC endpoints before credentials
NicolasLopes7 Jul 21, 2026
f8bbba8
feat(ui): add OIDC credentials configuration step
NicolasLopes7 Jul 22, 2026
b8a4067
fix(ui): align OIDC credentials configuration
NicolasLopes7 Jul 22, 2026
0f47940
fix(ui): use OIDC redirect URI from FAPI
NicolasLopes7 Jul 22, 2026
84e8714
fix(ui): show OIDC debug redirect URI
NicolasLopes7 Jul 22, 2026
0f9ef24
remove debug URI field
NicolasLopes7 Jul 23, 2026
eb3360e
refactor: move step into separate components rather than single-file
NicolasLopes7 Jul 23, 2026
67dc5cd
gymnastics
NicolasLopes7 Jul 23, 2026
af6b470
fix(ui): recognize custom OIDC provider keys
NicolasLopes7 Jul 23, 2026
5fc65c8
fix(ui): remove dead OIDC scopes control
NicolasLopes7 Jul 27, 2026
284c7ad
fix(ui): simplify OIDC setup flow
NicolasLopes7 Jul 28, 2026
b74a8c6
fix(ui): highlight OIDC token claims
NicolasLopes7 Jul 28, 2026
d25f3c0
fix(ui): separate OIDC token claims
NicolasLopes7 Jul 28, 2026
63d7c94
fix(ui): inline OIDC token claim guidance
NicolasLopes7 Jul 28, 2026
d546a93
fix(ui): show OIDC claims after redirect URI
NicolasLopes7 Jul 28, 2026
d39578c
fix(ui): address OIDC review feedback
NicolasLopes7 Jul 28, 2026
b41bc8d
chore(ui): merge OIDC self-serve configuration
NicolasLopes7 Jul 28, 2026
6ccc628
refactor(ui): simplify OIDC configuration
NicolasLopes7 Jul 28, 2026
87edea6
fix(ui): address OIDC configure feedback
NicolasLopes7 Jul 28, 2026
680de51
chore(ui): remove feedback changeset
NicolasLopes7 Jul 28, 2026
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
8 changes: 8 additions & 0 deletions packages/clerk-js/src/core/resources/EnterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,11 @@ function oauthConfigFromJSON(data: EnterpriseOAuthConfigJSON): EnterpriseOAuthCo
name: data.name,
clientId: data.client_id,
providerKey: data.provider_key,
redirectUri: data.redirect_uri,
discoveryUrl: data.discovery_url,
authUrl: data.auth_url,
tokenUrl: data.token_url,
userInfoUrl: data.user_info_url,
logoPublicUrl: data.logo_public_url,
requiresPkce: data.requires_pkce,
createdAt: unixEpochToDate(data.created_at),
Expand All@@ -73,7 +77,11 @@ function oauthConfigToJSON(data: EnterpriseOAuthConfigResource): EnterpriseOAuth
name: data.name,
client_id: data.clientId,
provider_key: data.providerKey,
redirect_uri: data.redirectUri,
discovery_url: data.discoveryUrl,
auth_url: data.authUrl,
token_url: data.tokenUrl,
user_info_url: data.userInfoUrl,
logo_public_url: data.logoPublicUrl,
requires_pkce: data.requiresPkce,
created_at: data.createdAt?.getTime() ?? 0,
Expand Down
58 changes: 55 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,18 +240,70 @@ export const enUS: LocalizationResource = {
},
},
oidcCustom: {
claimsStep: {
headerSubtitle: 'Set the claims your identity provider includes in the ID token',
},
credentialsStep: {
headerSubtitle: 'Add your application credentials',
clientId: {
label: 'Client ID',
placeholder: 'Paste client ID here...',
},
clientSecret: {
label: 'Client secret',
placeholder: 'Paste client secret here...',
},
paragraph: 'In your identity provider’s OIDC application, retrieve these values.',
},
endpointsStep: {
headerSubtitle: 'Add your identity provider’s endpoints',
discoveryUrl: {
description:
'In your identity provider’s OIDC application, retrieve the discovery endpoint. Paste it below.',
label: 'Discovery endpoint',
placeholder: 'Paste URL here...',
},
manual: {
authUrl: {
label: 'Authorization URL',
placeholder: 'Paste URL here...',
},
description: 'In your identity provider’s OIDC application, retrieve these values.',
tokenUrl: {
label: 'Token URL',
placeholder: 'Paste URL here...',
},
userInfoUrl: {
label: 'User Info URL',
placeholder: 'Paste URL here...',
},
},
modes: {
ariaLabel: 'OIDC endpoint configuration method',
discoveryUrl: 'Add via discovery endpoint',
manual: 'Configure manually',
},
},
mainHeaderTitle: 'Configure your identity provider',
redirectUriStep: {
headerSubtitle: 'Create a new OIDC application in your identity provider’s dashboard',
paragraph:
'In your identity provider’s dashboard, create a new OIDC application that supports the authorization code grant type, and use the following redirect URI:',
claims: {
description: 'Ensure your ID token includes the following claims:',
table: {
columns: {
attribute: 'Clerk attribute',
claim: 'ID token claim',
},
rows: {
email: { attribute: 'Primary email' },
firstName: { attribute: 'First name' },
lastName: { attribute: 'Last name' },
subject: { attribute: 'External user ID' },
},
},
},
redirectUri: {
label: 'Authorized redirect URI',
},
},
},
samlCustom: {
Expand Down
10 changes: 10 additions & 0 deletions packages/shared/src/types/elementIds.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,16 @@ export type FieldId =
| 'idpMetadata'
| 'idpMetadataUrl'
| 'idpSsoUrl'
| 'discoveryUrl'
| 'authUrl'
| 'tokenUrl'
| 'userInfoUrl'
| 'clientId'
| 'clientSecret'
| 'redirectUri'
| 'oidcClientId'
| 'oidcClientSecret'
| 'oidcRedirectUri'
| 'acsUrl'
| 'spEntityId'
| 'web3WalletName'
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/types/enterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,11 @@ export interface EnterpriseOAuthConfigJSON {
name: string;
provider_key?: string;
client_id: string;
redirect_uri?: string;
discovery_url?: string;
auth_url?: string;
token_url?: string;
user_info_url?: string;
logo_public_url?: string | null;
requires_pkce?: boolean;
created_at: number;
Expand All@@ -112,7 +116,11 @@ export interface EnterpriseOAuthConfigResource {
name: string;
clientId: string;
providerKey?: string;
redirectUri?: string;
discoveryUrl?: string;
authUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
logoPublicUrl?: string | null;
requiresPkce?: boolean;
createdAt: Date | null;
Expand Down
56 changes: 53 additions & 3 deletions packages/shared/src/types/localization.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -1529,15 +1529,65 @@ export type __internal_LocalizationResource = {
mainHeaderTitle: LocalizationValue;
redirectUriStep: {
headerSubtitle: LocalizationValue;
};
claimsStep: {
headerSubtitle: LocalizationValue;
paragraph: LocalizationValue;
claims: {
description: LocalizationValue;
table: {
columns: {
attribute: LocalizationValue;
claim: LocalizationValue;
};
rows: {
email: { attribute: LocalizationValue };
firstName: { attribute: LocalizationValue };
lastName: { attribute: LocalizationValue };
subject: { attribute: LocalizationValue };
};
};
};
redirectUri: {
label: LocalizationValue;
};
};
endpointsStep: {
headerSubtitle: LocalizationValue;
discoveryUrl: {
description: LocalizationValue;
label: LocalizationValue;
placeholder: LocalizationValue;
};
manual: {
authUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
description: LocalizationValue;
tokenUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
userInfoUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
};
modes: {
ariaLabel: LocalizationValue;
discoveryUrl: LocalizationValue;
manual: LocalizationValue;
};
};
credentialsStep: {
headerSubtitle: LocalizationValue;
clientId: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
clientSecret: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
paragraph: LocalizationValue;
};
};
unsupportedProvider: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@ import {
areAllOrganizationDomainsVerified,
connectionBackingEmail,
isEnterpriseConnectionConfigured,
isOidcProvider,
organizationEnterpriseConnection,
} from '../organizationEnterpriseConnection';

Expand DownExpand Up@@ -62,7 +61,7 @@ const fullyConfiguredSaml = makeSamlConnection({
const configuredOidc = makeOauthConfig({ clientId: 'client_abc' });

const makeOidcConnection = (overrides: Partial<EnterpriseConnectionResource> = {}): EnterpriseConnectionResource =>
makeConnection({ provider: 'oidc_custom', samlConnection: null, oauthConfig: configuredOidc, ...overrides });
makeConnection({ provider: 'oauth_custom_acme', samlConnection: null, oauthConfig: configuredOidc, ...overrides });

// Builds the entity with sensible defaults; each test overrides what it cares
// about.
Expand All@@ -75,18 +74,6 @@ const derive = (overrides: Partial<Parameters<typeof organizationEnterpriseConne
});

describe('organizationEnterpriseConnection', () => {
describe('isOidcProvider', () => {
it('recognizes OIDC provider keys with the oidc_ prefix', () => {
expect(isOidcProvider('oidc_custom')).toBe(true);
expect(isOidcProvider('oidc_clerk_dev')).toBe(true);
});

it('rejects malformed OIDC provider keys', () => {
expect(isOidcProvider('oidc')).toBe(false);
expect(isOidcProvider('oidcfoo')).toBe(false);
});
});

describe('hasConnection', () => {
it('undefined connection → false', () => {
expect(derive({ connection: undefined }).hasConnection).toBe(false);
Expand All@@ -106,8 +93,10 @@ describe('organizationEnterpriseConnection', () => {
it('connection → its provider', () => {
expect(derive({ connection: makeConnection({ provider: 'saml_custom' }) }).provider).toBe('saml_custom');
});
it('carries a derived OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oidc_clerk_dev' }) }).provider).toBe('oidc_clerk_dev');
it('carries a custom OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oauth_custom_clerk_dev' }) }).provider).toBe(
'oauth_custom_clerk_dev',
);
});
});

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import type {

import type { EnterpriseConnectionProviderType, OidcProviderType } from '../types';

export const isOidcProvider = (provider: string): provider is OidcProviderType => provider.startsWith('oidc_');
export const isOidcProvider = (provider: string): provider is OidcProviderType =>
provider.startsWith('oidc_') || provider.startsWith('oauth_custom_');

/**
* The email whose domain backs the connection: the user's primary address if
Expand DownExpand Up@@ -56,7 +57,6 @@ export const isEnterpriseConnectionConfigured = (
if (!connection) {
return false;
}
// OIDC exposes only the client ID on the resource; the secret and manual endpoints are write-only.
if (isOidcProvider(connection.provider)) {
return Boolean(connection.oauthConfig?.clientId);
}
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
674669e
feat(ui): display OIDC authorized redirect URI
NicolasLopes7 Jul 21, 2026
7b8a088
feat(ui): add OIDC claims configuration step
NicolasLopes7 Jul 21, 2026
069f908
feat(ui): add OIDC endpoint configuration step
NicolasLopes7 Jul 21, 2026
ae23318
feat(ui): save OIDC endpoints before credentials
NicolasLopes7 Jul 21, 2026
f8bbba8
feat(ui): add OIDC credentials configuration step
NicolasLopes7 Jul 22, 2026
b8a4067
fix(ui): align OIDC credentials configuration
NicolasLopes7 Jul 22, 2026
0f47940
fix(ui): use OIDC redirect URI from FAPI
NicolasLopes7 Jul 22, 2026
84e8714
fix(ui): show OIDC debug redirect URI
NicolasLopes7 Jul 22, 2026
0f9ef24
remove debug URI field
NicolasLopes7 Jul 23, 2026
eb3360e
refactor: move step into separate components rather than single-file
NicolasLopes7 Jul 23, 2026
67dc5cd
gymnastics
NicolasLopes7 Jul 23, 2026
af6b470
fix(ui): recognize custom OIDC provider keys
NicolasLopes7 Jul 23, 2026
5fc65c8
fix(ui): remove dead OIDC scopes control
NicolasLopes7 Jul 27, 2026
284c7ad
fix(ui): simplify OIDC setup flow
NicolasLopes7 Jul 28, 2026
b74a8c6
fix(ui): highlight OIDC token claims
NicolasLopes7 Jul 28, 2026
d25f3c0
fix(ui): separate OIDC token claims
NicolasLopes7 Jul 28, 2026
63d7c94
fix(ui): inline OIDC token claim guidance
NicolasLopes7 Jul 28, 2026
d546a93
fix(ui): show OIDC claims after redirect URI
NicolasLopes7 Jul 28, 2026
d39578c
fix(ui): address OIDC review feedback
NicolasLopes7 Jul 28, 2026
b41bc8d
chore(ui): merge OIDC self-serve configuration
NicolasLopes7 Jul 28, 2026
6ccc628
refactor(ui): simplify OIDC configuration
NicolasLopes7 Jul 28, 2026
87edea6
fix(ui): address OIDC configure feedback
NicolasLopes7 Jul 28, 2026
680de51
chore(ui): remove feedback changeset
NicolasLopes7 Jul 28, 2026
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
8 changes: 8 additions & 0 deletions packages/clerk-js/src/core/resources/EnterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,11 @@ function oauthConfigFromJSON(data: EnterpriseOAuthConfigJSON): EnterpriseOAuthCo
name: data.name,
clientId: data.client_id,
providerKey: data.provider_key,
redirectUri: data.redirect_uri,
discoveryUrl: data.discovery_url,
authUrl: data.auth_url,
tokenUrl: data.token_url,
userInfoUrl: data.user_info_url,
logoPublicUrl: data.logo_public_url,
requiresPkce: data.requires_pkce,
createdAt: unixEpochToDate(data.created_at),
Expand All@@ -73,7 +77,11 @@ function oauthConfigToJSON(data: EnterpriseOAuthConfigResource): EnterpriseOAuth
name: data.name,
client_id: data.clientId,
provider_key: data.providerKey,
redirect_uri: data.redirectUri,
discovery_url: data.discoveryUrl,
auth_url: data.authUrl,
token_url: data.tokenUrl,
user_info_url: data.userInfoUrl,
logo_public_url: data.logoPublicUrl,
requires_pkce: data.requiresPkce,
created_at: data.createdAt?.getTime() ?? 0,
Expand Down
58 changes: 55 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,18 +240,70 @@ export const enUS: LocalizationResource = {
},
},
oidcCustom: {
claimsStep: {
headerSubtitle: 'Set the claims your identity provider includes in the ID token',
},
credentialsStep: {
headerSubtitle: 'Add your application credentials',
clientId: {
label: 'Client ID',
placeholder: 'Paste client ID here...',
},
clientSecret: {
label: 'Client secret',
placeholder: 'Paste client secret here...',
},
paragraph: 'In your identity provider’s OIDC application, retrieve these values.',
},
endpointsStep: {
headerSubtitle: 'Add your identity provider’s endpoints',
discoveryUrl: {
description:
'In your identity provider’s OIDC application, retrieve the discovery endpoint. Paste it below.',
label: 'Discovery endpoint',
placeholder: 'Paste URL here...',
},
manual: {
authUrl: {
label: 'Authorization URL',
placeholder: 'Paste URL here...',
},
description: 'In your identity provider’s OIDC application, retrieve these values.',
tokenUrl: {
label: 'Token URL',
placeholder: 'Paste URL here...',
},
userInfoUrl: {
label: 'User Info URL',
placeholder: 'Paste URL here...',
},
},
modes: {
ariaLabel: 'OIDC endpoint configuration method',
discoveryUrl: 'Add via discovery endpoint',
manual: 'Configure manually',
},
},
mainHeaderTitle: 'Configure your identity provider',
redirectUriStep: {
headerSubtitle: 'Create a new OIDC application in your identity provider’s dashboard',
paragraph:
'In your identity provider’s dashboard, create a new OIDC application that supports the authorization code grant type, and use the following redirect URI:',
claims: {
description: 'Ensure your ID token includes the following claims:',
table: {
columns: {
attribute: 'Clerk attribute',
claim: 'ID token claim',
},
rows: {
email: { attribute: 'Primary email' },
firstName: { attribute: 'First name' },
lastName: { attribute: 'Last name' },
subject: { attribute: 'External user ID' },
},
},
},
redirectUri: {
label: 'Authorized redirect URI',
},
},
},
samlCustom: {
Expand Down
10 changes: 10 additions & 0 deletions packages/shared/src/types/elementIds.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,16 @@ export type FieldId =
| 'idpMetadata'
| 'idpMetadataUrl'
| 'idpSsoUrl'
| 'discoveryUrl'
| 'authUrl'
| 'tokenUrl'
| 'userInfoUrl'
| 'clientId'
| 'clientSecret'
| 'redirectUri'
| 'oidcClientId'
| 'oidcClientSecret'
| 'oidcRedirectUri'
| 'acsUrl'
| 'spEntityId'
| 'web3WalletName'
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/types/enterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,11 @@ export interface EnterpriseOAuthConfigJSON {
name: string;
provider_key?: string;
client_id: string;
redirect_uri?: string;
discovery_url?: string;
auth_url?: string;
token_url?: string;
user_info_url?: string;
logo_public_url?: string | null;
requires_pkce?: boolean;
created_at: number;
Expand All@@ -112,7 +116,11 @@ export interface EnterpriseOAuthConfigResource {
name: string;
clientId: string;
providerKey?: string;
redirectUri?: string;
discoveryUrl?: string;
authUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
logoPublicUrl?: string | null;
requiresPkce?: boolean;
createdAt: Date | null;
Expand Down
56 changes: 53 additions & 3 deletions packages/shared/src/types/localization.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -1529,15 +1529,65 @@ export type __internal_LocalizationResource = {
mainHeaderTitle: LocalizationValue;
redirectUriStep: {
headerSubtitle: LocalizationValue;
};
claimsStep: {
headerSubtitle: LocalizationValue;
paragraph: LocalizationValue;
claims: {
description: LocalizationValue;
table: {
columns: {
attribute: LocalizationValue;
claim: LocalizationValue;
};
rows: {
email: { attribute: LocalizationValue };
firstName: { attribute: LocalizationValue };
lastName: { attribute: LocalizationValue };
subject: { attribute: LocalizationValue };
};
};
};
redirectUri: {
label: LocalizationValue;
};
};
endpointsStep: {
headerSubtitle: LocalizationValue;
discoveryUrl: {
description: LocalizationValue;
label: LocalizationValue;
placeholder: LocalizationValue;
};
manual: {
authUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
description: LocalizationValue;
tokenUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
userInfoUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
};
modes: {
ariaLabel: LocalizationValue;
discoveryUrl: LocalizationValue;
manual: LocalizationValue;
};
};
credentialsStep: {
headerSubtitle: LocalizationValue;
clientId: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
clientSecret: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
paragraph: LocalizationValue;
};
};
unsupportedProvider: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@ import {
areAllOrganizationDomainsVerified,
connectionBackingEmail,
isEnterpriseConnectionConfigured,
isOidcProvider,
organizationEnterpriseConnection,
} from '../organizationEnterpriseConnection';

Expand DownExpand Up@@ -62,7 +61,7 @@ const fullyConfiguredSaml = makeSamlConnection({
const configuredOidc = makeOauthConfig({ clientId: 'client_abc' });

const makeOidcConnection = (overrides: Partial<EnterpriseConnectionResource> = {}): EnterpriseConnectionResource =>
makeConnection({ provider: 'oidc_custom', samlConnection: null, oauthConfig: configuredOidc, ...overrides });
makeConnection({ provider: 'oauth_custom_acme', samlConnection: null, oauthConfig: configuredOidc, ...overrides });

// Builds the entity with sensible defaults; each test overrides what it cares
// about.
Expand All@@ -75,18 +74,6 @@ const derive = (overrides: Partial<Parameters<typeof organizationEnterpriseConne
});

describe('organizationEnterpriseConnection', () => {
describe('isOidcProvider', () => {
it('recognizes OIDC provider keys with the oidc_ prefix', () => {
expect(isOidcProvider('oidc_custom')).toBe(true);
expect(isOidcProvider('oidc_clerk_dev')).toBe(true);
});

it('rejects malformed OIDC provider keys', () => {
expect(isOidcProvider('oidc')).toBe(false);
expect(isOidcProvider('oidcfoo')).toBe(false);
});
});

describe('hasConnection', () => {
it('undefined connection → false', () => {
expect(derive({ connection: undefined }).hasConnection).toBe(false);
Expand All@@ -106,8 +93,10 @@ describe('organizationEnterpriseConnection', () => {
it('connection → its provider', () => {
expect(derive({ connection: makeConnection({ provider: 'saml_custom' }) }).provider).toBe('saml_custom');
});
it('carries a derived OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oidc_clerk_dev' }) }).provider).toBe('oidc_clerk_dev');
it('carries a custom OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oauth_custom_clerk_dev' }) }).provider).toBe(
'oauth_custom_clerk_dev',
);
});
});

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import type {

import type { EnterpriseConnectionProviderType, OidcProviderType } from '../types';

export const isOidcProvider = (provider: string): provider is OidcProviderType => provider.startsWith('oidc_');
export const isOidcProvider = (provider: string): provider is OidcProviderType =>
provider.startsWith('oidc_') || provider.startsWith('oauth_custom_');

/**
* The email whose domain backs the connection: the user's primary address if
Expand DownExpand Up@@ -56,7 +57,6 @@ export const isEnterpriseConnectionConfigured = (
if (!connection) {
return false;
}
// OIDC exposes only the client ID on the resource; the secret and manual endpoints are write-only.
if (isOidcProvider(connection.provider)) {
return Boolean(connection.oauthConfig?.clientId);
}
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
674669e
feat(ui): display OIDC authorized redirect URI
NicolasLopes7 Jul 21, 2026
7b8a088
feat(ui): add OIDC claims configuration step
NicolasLopes7 Jul 21, 2026
069f908
feat(ui): add OIDC endpoint configuration step
NicolasLopes7 Jul 21, 2026
ae23318
feat(ui): save OIDC endpoints before credentials
NicolasLopes7 Jul 21, 2026
f8bbba8
feat(ui): add OIDC credentials configuration step
NicolasLopes7 Jul 22, 2026
b8a4067
fix(ui): align OIDC credentials configuration
NicolasLopes7 Jul 22, 2026
0f47940
fix(ui): use OIDC redirect URI from FAPI
NicolasLopes7 Jul 22, 2026
84e8714
fix(ui): show OIDC debug redirect URI
NicolasLopes7 Jul 22, 2026
0f9ef24
remove debug URI field
NicolasLopes7 Jul 23, 2026
eb3360e
refactor: move step into separate components rather than single-file
NicolasLopes7 Jul 23, 2026
67dc5cd
gymnastics
NicolasLopes7 Jul 23, 2026
af6b470
fix(ui): recognize custom OIDC provider keys
NicolasLopes7 Jul 23, 2026
5fc65c8
fix(ui): remove dead OIDC scopes control
NicolasLopes7 Jul 27, 2026
284c7ad
fix(ui): simplify OIDC setup flow
NicolasLopes7 Jul 28, 2026
b74a8c6
fix(ui): highlight OIDC token claims
NicolasLopes7 Jul 28, 2026
d25f3c0
fix(ui): separate OIDC token claims
NicolasLopes7 Jul 28, 2026
63d7c94
fix(ui): inline OIDC token claim guidance
NicolasLopes7 Jul 28, 2026
d546a93
fix(ui): show OIDC claims after redirect URI
NicolasLopes7 Jul 28, 2026
d39578c
fix(ui): address OIDC review feedback
NicolasLopes7 Jul 28, 2026
b41bc8d
chore(ui): merge OIDC self-serve configuration
NicolasLopes7 Jul 28, 2026
6ccc628
refactor(ui): simplify OIDC configuration
NicolasLopes7 Jul 28, 2026
87edea6
fix(ui): address OIDC configure feedback
NicolasLopes7 Jul 28, 2026
680de51
chore(ui): remove feedback changeset
NicolasLopes7 Jul 28, 2026
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
8 changes: 8 additions & 0 deletions packages/clerk-js/src/core/resources/EnterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,11 @@ function oauthConfigFromJSON(data: EnterpriseOAuthConfigJSON): EnterpriseOAuthCo
name: data.name,
clientId: data.client_id,
providerKey: data.provider_key,
redirectUri: data.redirect_uri,
discoveryUrl: data.discovery_url,
authUrl: data.auth_url,
tokenUrl: data.token_url,
userInfoUrl: data.user_info_url,
logoPublicUrl: data.logo_public_url,
requiresPkce: data.requires_pkce,
createdAt: unixEpochToDate(data.created_at),
Expand All@@ -73,7 +77,11 @@ function oauthConfigToJSON(data: EnterpriseOAuthConfigResource): EnterpriseOAuth
name: data.name,
client_id: data.clientId,
provider_key: data.providerKey,
redirect_uri: data.redirectUri,
discovery_url: data.discoveryUrl,
auth_url: data.authUrl,
token_url: data.tokenUrl,
user_info_url: data.userInfoUrl,
logo_public_url: data.logoPublicUrl,
requires_pkce: data.requiresPkce,
created_at: data.createdAt?.getTime() ?? 0,
Expand Down
58 changes: 55 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,18 +240,70 @@ export const enUS: LocalizationResource = {
},
},
oidcCustom: {
claimsStep: {
headerSubtitle: 'Set the claims your identity provider includes in the ID token',
},
credentialsStep: {
headerSubtitle: 'Add your application credentials',
clientId: {
label: 'Client ID',
placeholder: 'Paste client ID here...',
},
clientSecret: {
label: 'Client secret',
placeholder: 'Paste client secret here...',
},
paragraph: 'In your identity provider’s OIDC application, retrieve these values.',
},
endpointsStep: {
headerSubtitle: 'Add your identity provider’s endpoints',
discoveryUrl: {
description:
'In your identity provider’s OIDC application, retrieve the discovery endpoint. Paste it below.',
label: 'Discovery endpoint',
placeholder: 'Paste URL here...',
},
manual: {
authUrl: {
label: 'Authorization URL',
placeholder: 'Paste URL here...',
},
description: 'In your identity provider’s OIDC application, retrieve these values.',
tokenUrl: {
label: 'Token URL',
placeholder: 'Paste URL here...',
},
userInfoUrl: {
label: 'User Info URL',
placeholder: 'Paste URL here...',
},
},
modes: {
ariaLabel: 'OIDC endpoint configuration method',
discoveryUrl: 'Add via discovery endpoint',
manual: 'Configure manually',
},
},
mainHeaderTitle: 'Configure your identity provider',
redirectUriStep: {
headerSubtitle: 'Create a new OIDC application in your identity provider’s dashboard',
paragraph:
'In your identity provider’s dashboard, create a new OIDC application that supports the authorization code grant type, and use the following redirect URI:',
claims: {
description: 'Ensure your ID token includes the following claims:',
table: {
columns: {
attribute: 'Clerk attribute',
claim: 'ID token claim',
},
rows: {
email: { attribute: 'Primary email' },
firstName: { attribute: 'First name' },
lastName: { attribute: 'Last name' },
subject: { attribute: 'External user ID' },
},
},
},
redirectUri: {
label: 'Authorized redirect URI',
},
},
},
samlCustom: {
Expand Down
10 changes: 10 additions & 0 deletions packages/shared/src/types/elementIds.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,16 @@ export type FieldId =
| 'idpMetadata'
| 'idpMetadataUrl'
| 'idpSsoUrl'
| 'discoveryUrl'
| 'authUrl'
| 'tokenUrl'
| 'userInfoUrl'
| 'clientId'
| 'clientSecret'
| 'redirectUri'
| 'oidcClientId'
| 'oidcClientSecret'
| 'oidcRedirectUri'
| 'acsUrl'
| 'spEntityId'
| 'web3WalletName'
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/types/enterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,11 @@ export interface EnterpriseOAuthConfigJSON {
name: string;
provider_key?: string;
client_id: string;
redirect_uri?: string;
discovery_url?: string;
auth_url?: string;
token_url?: string;
user_info_url?: string;
logo_public_url?: string | null;
requires_pkce?: boolean;
created_at: number;
Expand All@@ -112,7 +116,11 @@ export interface EnterpriseOAuthConfigResource {
name: string;
clientId: string;
providerKey?: string;
redirectUri?: string;
discoveryUrl?: string;
authUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
logoPublicUrl?: string | null;
requiresPkce?: boolean;
createdAt: Date | null;
Expand Down
56 changes: 53 additions & 3 deletions packages/shared/src/types/localization.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -1529,15 +1529,65 @@ export type __internal_LocalizationResource = {
mainHeaderTitle: LocalizationValue;
redirectUriStep: {
headerSubtitle: LocalizationValue;
};
claimsStep: {
headerSubtitle: LocalizationValue;
paragraph: LocalizationValue;
claims: {
description: LocalizationValue;
table: {
columns: {
attribute: LocalizationValue;
claim: LocalizationValue;
};
rows: {
email: { attribute: LocalizationValue };
firstName: { attribute: LocalizationValue };
lastName: { attribute: LocalizationValue };
subject: { attribute: LocalizationValue };
};
};
};
redirectUri: {
label: LocalizationValue;
};
};
endpointsStep: {
headerSubtitle: LocalizationValue;
discoveryUrl: {
description: LocalizationValue;
label: LocalizationValue;
placeholder: LocalizationValue;
};
manual: {
authUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
description: LocalizationValue;
tokenUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
userInfoUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
};
modes: {
ariaLabel: LocalizationValue;
discoveryUrl: LocalizationValue;
manual: LocalizationValue;
};
};
credentialsStep: {
headerSubtitle: LocalizationValue;
clientId: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
clientSecret: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
paragraph: LocalizationValue;
};
};
unsupportedProvider: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@ import {
areAllOrganizationDomainsVerified,
connectionBackingEmail,
isEnterpriseConnectionConfigured,
isOidcProvider,
organizationEnterpriseConnection,
} from '../organizationEnterpriseConnection';

Expand DownExpand Up@@ -62,7 +61,7 @@ const fullyConfiguredSaml = makeSamlConnection({
const configuredOidc = makeOauthConfig({ clientId: 'client_abc' });

const makeOidcConnection = (overrides: Partial<EnterpriseConnectionResource> = {}): EnterpriseConnectionResource =>
makeConnection({ provider: 'oidc_custom', samlConnection: null, oauthConfig: configuredOidc, ...overrides });
makeConnection({ provider: 'oauth_custom_acme', samlConnection: null, oauthConfig: configuredOidc, ...overrides });

// Builds the entity with sensible defaults; each test overrides what it cares
// about.
Expand All@@ -75,18 +74,6 @@ const derive = (overrides: Partial<Parameters<typeof organizationEnterpriseConne
});

describe('organizationEnterpriseConnection', () => {
describe('isOidcProvider', () => {
it('recognizes OIDC provider keys with the oidc_ prefix', () => {
expect(isOidcProvider('oidc_custom')).toBe(true);
expect(isOidcProvider('oidc_clerk_dev')).toBe(true);
});

it('rejects malformed OIDC provider keys', () => {
expect(isOidcProvider('oidc')).toBe(false);
expect(isOidcProvider('oidcfoo')).toBe(false);
});
});

describe('hasConnection', () => {
it('undefined connection → false', () => {
expect(derive({ connection: undefined }).hasConnection).toBe(false);
Expand All@@ -106,8 +93,10 @@ describe('organizationEnterpriseConnection', () => {
it('connection → its provider', () => {
expect(derive({ connection: makeConnection({ provider: 'saml_custom' }) }).provider).toBe('saml_custom');
});
it('carries a derived OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oidc_clerk_dev' }) }).provider).toBe('oidc_clerk_dev');
it('carries a custom OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oauth_custom_clerk_dev' }) }).provider).toBe(
'oauth_custom_clerk_dev',
);
});
});

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import type {

import type { EnterpriseConnectionProviderType, OidcProviderType } from '../types';

export const isOidcProvider = (provider: string): provider is OidcProviderType => provider.startsWith('oidc_');
export const isOidcProvider = (provider: string): provider is OidcProviderType =>
provider.startsWith('oidc_') || provider.startsWith('oauth_custom_');

/**
* The email whose domain backs the connection: the user's primary address if
Expand DownExpand Up@@ -56,7 +57,6 @@ export const isEnterpriseConnectionConfigured = (
if (!connection) {
return false;
}
// OIDC exposes only the client ID on the resource; the secret and manual endpoints are write-only.
if (isOidcProvider(connection.provider)) {
return Boolean(connection.oauthConfig?.clientId);
}
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
674669e
feat(ui): display OIDC authorized redirect URI
NicolasLopes7 Jul 21, 2026
7b8a088
feat(ui): add OIDC claims configuration step
NicolasLopes7 Jul 21, 2026
069f908
feat(ui): add OIDC endpoint configuration step
NicolasLopes7 Jul 21, 2026
ae23318
feat(ui): save OIDC endpoints before credentials
NicolasLopes7 Jul 21, 2026
f8bbba8
feat(ui): add OIDC credentials configuration step
NicolasLopes7 Jul 22, 2026
b8a4067
fix(ui): align OIDC credentials configuration
NicolasLopes7 Jul 22, 2026
0f47940
fix(ui): use OIDC redirect URI from FAPI
NicolasLopes7 Jul 22, 2026
84e8714
fix(ui): show OIDC debug redirect URI
NicolasLopes7 Jul 22, 2026
0f9ef24
remove debug URI field
NicolasLopes7 Jul 23, 2026
eb3360e
refactor: move step into separate components rather than single-file
NicolasLopes7 Jul 23, 2026
67dc5cd
gymnastics
NicolasLopes7 Jul 23, 2026
af6b470
fix(ui): recognize custom OIDC provider keys
NicolasLopes7 Jul 23, 2026
5fc65c8
fix(ui): remove dead OIDC scopes control
NicolasLopes7 Jul 27, 2026
284c7ad
fix(ui): simplify OIDC setup flow
NicolasLopes7 Jul 28, 2026
b74a8c6
fix(ui): highlight OIDC token claims
NicolasLopes7 Jul 28, 2026
d25f3c0
fix(ui): separate OIDC token claims
NicolasLopes7 Jul 28, 2026
63d7c94
fix(ui): inline OIDC token claim guidance
NicolasLopes7 Jul 28, 2026
d546a93
fix(ui): show OIDC claims after redirect URI
NicolasLopes7 Jul 28, 2026
d39578c
fix(ui): address OIDC review feedback
NicolasLopes7 Jul 28, 2026
b41bc8d
chore(ui): merge OIDC self-serve configuration
NicolasLopes7 Jul 28, 2026
6ccc628
refactor(ui): simplify OIDC configuration
NicolasLopes7 Jul 28, 2026
87edea6
fix(ui): address OIDC configure feedback
NicolasLopes7 Jul 28, 2026
680de51
chore(ui): remove feedback changeset
NicolasLopes7 Jul 28, 2026
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
8 changes: 8 additions & 0 deletions packages/clerk-js/src/core/resources/EnterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,11 @@ function oauthConfigFromJSON(data: EnterpriseOAuthConfigJSON): EnterpriseOAuthCo
name: data.name,
clientId: data.client_id,
providerKey: data.provider_key,
redirectUri: data.redirect_uri,
discoveryUrl: data.discovery_url,
authUrl: data.auth_url,
tokenUrl: data.token_url,
userInfoUrl: data.user_info_url,
logoPublicUrl: data.logo_public_url,
requiresPkce: data.requires_pkce,
createdAt: unixEpochToDate(data.created_at),
Expand All@@ -73,7 +77,11 @@ function oauthConfigToJSON(data: EnterpriseOAuthConfigResource): EnterpriseOAuth
name: data.name,
client_id: data.clientId,
provider_key: data.providerKey,
redirect_uri: data.redirectUri,
discovery_url: data.discoveryUrl,
auth_url: data.authUrl,
token_url: data.tokenUrl,
user_info_url: data.userInfoUrl,
logo_public_url: data.logoPublicUrl,
requires_pkce: data.requiresPkce,
created_at: data.createdAt?.getTime() ?? 0,
Expand Down
58 changes: 55 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,18 +240,70 @@ export const enUS: LocalizationResource = {
},
},
oidcCustom: {
claimsStep: {
headerSubtitle: 'Set the claims your identity provider includes in the ID token',
},
credentialsStep: {
headerSubtitle: 'Add your application credentials',
clientId: {
label: 'Client ID',
placeholder: 'Paste client ID here...',
},
clientSecret: {
label: 'Client secret',
placeholder: 'Paste client secret here...',
},
paragraph: 'In your identity provider’s OIDC application, retrieve these values.',
},
endpointsStep: {
headerSubtitle: 'Add your identity provider’s endpoints',
discoveryUrl: {
description:
'In your identity provider’s OIDC application, retrieve the discovery endpoint. Paste it below.',
label: 'Discovery endpoint',
placeholder: 'Paste URL here...',
},
manual: {
authUrl: {
label: 'Authorization URL',
placeholder: 'Paste URL here...',
},
description: 'In your identity provider’s OIDC application, retrieve these values.',
tokenUrl: {
label: 'Token URL',
placeholder: 'Paste URL here...',
},
userInfoUrl: {
label: 'User Info URL',
placeholder: 'Paste URL here...',
},
},
modes: {
ariaLabel: 'OIDC endpoint configuration method',
discoveryUrl: 'Add via discovery endpoint',
manual: 'Configure manually',
},
},
mainHeaderTitle: 'Configure your identity provider',
redirectUriStep: {
headerSubtitle: 'Create a new OIDC application in your identity provider’s dashboard',
paragraph:
'In your identity provider’s dashboard, create a new OIDC application that supports the authorization code grant type, and use the following redirect URI:',
claims: {
description: 'Ensure your ID token includes the following claims:',
table: {
columns: {
attribute: 'Clerk attribute',
claim: 'ID token claim',
},
rows: {
email: { attribute: 'Primary email' },
firstName: { attribute: 'First name' },
lastName: { attribute: 'Last name' },
subject: { attribute: 'External user ID' },
},
},
},
redirectUri: {
label: 'Authorized redirect URI',
},
},
},
samlCustom: {
Expand Down
10 changes: 10 additions & 0 deletions packages/shared/src/types/elementIds.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,16 @@ export type FieldId =
| 'idpMetadata'
| 'idpMetadataUrl'
| 'idpSsoUrl'
| 'discoveryUrl'
| 'authUrl'
| 'tokenUrl'
| 'userInfoUrl'
| 'clientId'
| 'clientSecret'
| 'redirectUri'
| 'oidcClientId'
| 'oidcClientSecret'
| 'oidcRedirectUri'
| 'acsUrl'
| 'spEntityId'
| 'web3WalletName'
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/types/enterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,11 @@ export interface EnterpriseOAuthConfigJSON {
name: string;
provider_key?: string;
client_id: string;
redirect_uri?: string;
discovery_url?: string;
auth_url?: string;
token_url?: string;
user_info_url?: string;
logo_public_url?: string | null;
requires_pkce?: boolean;
created_at: number;
Expand All@@ -112,7 +116,11 @@ export interface EnterpriseOAuthConfigResource {
name: string;
clientId: string;
providerKey?: string;
redirectUri?: string;
discoveryUrl?: string;
authUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
logoPublicUrl?: string | null;
requiresPkce?: boolean;
createdAt: Date | null;
Expand Down
56 changes: 53 additions & 3 deletions packages/shared/src/types/localization.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -1529,15 +1529,65 @@ export type __internal_LocalizationResource = {
mainHeaderTitle: LocalizationValue;
redirectUriStep: {
headerSubtitle: LocalizationValue;
};
claimsStep: {
headerSubtitle: LocalizationValue;
paragraph: LocalizationValue;
claims: {
description: LocalizationValue;
table: {
columns: {
attribute: LocalizationValue;
claim: LocalizationValue;
};
rows: {
email: { attribute: LocalizationValue };
firstName: { attribute: LocalizationValue };
lastName: { attribute: LocalizationValue };
subject: { attribute: LocalizationValue };
};
};
};
redirectUri: {
label: LocalizationValue;
};
};
endpointsStep: {
headerSubtitle: LocalizationValue;
discoveryUrl: {
description: LocalizationValue;
label: LocalizationValue;
placeholder: LocalizationValue;
};
manual: {
authUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
description: LocalizationValue;
tokenUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
userInfoUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
};
modes: {
ariaLabel: LocalizationValue;
discoveryUrl: LocalizationValue;
manual: LocalizationValue;
};
};
credentialsStep: {
headerSubtitle: LocalizationValue;
clientId: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
clientSecret: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
paragraph: LocalizationValue;
};
};
unsupportedProvider: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@ import {
areAllOrganizationDomainsVerified,
connectionBackingEmail,
isEnterpriseConnectionConfigured,
isOidcProvider,
organizationEnterpriseConnection,
} from '../organizationEnterpriseConnection';

Expand DownExpand Up@@ -62,7 +61,7 @@ const fullyConfiguredSaml = makeSamlConnection({
const configuredOidc = makeOauthConfig({ clientId: 'client_abc' });

const makeOidcConnection = (overrides: Partial<EnterpriseConnectionResource> = {}): EnterpriseConnectionResource =>
makeConnection({ provider: 'oidc_custom', samlConnection: null, oauthConfig: configuredOidc, ...overrides });
makeConnection({ provider: 'oauth_custom_acme', samlConnection: null, oauthConfig: configuredOidc, ...overrides });

// Builds the entity with sensible defaults; each test overrides what it cares
// about.
Expand All@@ -75,18 +74,6 @@ const derive = (overrides: Partial<Parameters<typeof organizationEnterpriseConne
});

describe('organizationEnterpriseConnection', () => {
describe('isOidcProvider', () => {
it('recognizes OIDC provider keys with the oidc_ prefix', () => {
expect(isOidcProvider('oidc_custom')).toBe(true);
expect(isOidcProvider('oidc_clerk_dev')).toBe(true);
});

it('rejects malformed OIDC provider keys', () => {
expect(isOidcProvider('oidc')).toBe(false);
expect(isOidcProvider('oidcfoo')).toBe(false);
});
});

describe('hasConnection', () => {
it('undefined connection → false', () => {
expect(derive({ connection: undefined }).hasConnection).toBe(false);
Expand All@@ -106,8 +93,10 @@ describe('organizationEnterpriseConnection', () => {
it('connection → its provider', () => {
expect(derive({ connection: makeConnection({ provider: 'saml_custom' }) }).provider).toBe('saml_custom');
});
it('carries a derived OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oidc_clerk_dev' }) }).provider).toBe('oidc_clerk_dev');
it('carries a custom OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oauth_custom_clerk_dev' }) }).provider).toBe(
'oauth_custom_clerk_dev',
);
});
});

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import type {

import type { EnterpriseConnectionProviderType, OidcProviderType } from '../types';

export const isOidcProvider = (provider: string): provider is OidcProviderType => provider.startsWith('oidc_');
export const isOidcProvider = (provider: string): provider is OidcProviderType =>
provider.startsWith('oidc_') || provider.startsWith('oauth_custom_');

/**
* The email whose domain backs the connection: the user's primary address if
Expand DownExpand Up@@ -56,7 +57,6 @@ export const isEnterpriseConnectionConfigured = (
if (!connection) {
return false;
}
// OIDC exposes only the client ID on the resource; the secret and manual endpoints are write-only.
if (isOidcProvider(connection.provider)) {
return Boolean(connection.oauthConfig?.clientId);
}
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
674669e
feat(ui): display OIDC authorized redirect URI
NicolasLopes7 Jul 21, 2026
7b8a088
feat(ui): add OIDC claims configuration step
NicolasLopes7 Jul 21, 2026
069f908
feat(ui): add OIDC endpoint configuration step
NicolasLopes7 Jul 21, 2026
ae23318
feat(ui): save OIDC endpoints before credentials
NicolasLopes7 Jul 21, 2026
f8bbba8
feat(ui): add OIDC credentials configuration step
NicolasLopes7 Jul 22, 2026
b8a4067
fix(ui): align OIDC credentials configuration
NicolasLopes7 Jul 22, 2026
0f47940
fix(ui): use OIDC redirect URI from FAPI
NicolasLopes7 Jul 22, 2026
84e8714
fix(ui): show OIDC debug redirect URI
NicolasLopes7 Jul 22, 2026
0f9ef24
remove debug URI field
NicolasLopes7 Jul 23, 2026
eb3360e
refactor: move step into separate components rather than single-file
NicolasLopes7 Jul 23, 2026
67dc5cd
gymnastics
NicolasLopes7 Jul 23, 2026
af6b470
fix(ui): recognize custom OIDC provider keys
NicolasLopes7 Jul 23, 2026
5fc65c8
fix(ui): remove dead OIDC scopes control
NicolasLopes7 Jul 27, 2026
284c7ad
fix(ui): simplify OIDC setup flow
NicolasLopes7 Jul 28, 2026
b74a8c6
fix(ui): highlight OIDC token claims
NicolasLopes7 Jul 28, 2026
d25f3c0
fix(ui): separate OIDC token claims
NicolasLopes7 Jul 28, 2026
63d7c94
fix(ui): inline OIDC token claim guidance
NicolasLopes7 Jul 28, 2026
d546a93
fix(ui): show OIDC claims after redirect URI
NicolasLopes7 Jul 28, 2026
d39578c
fix(ui): address OIDC review feedback
NicolasLopes7 Jul 28, 2026
b41bc8d
chore(ui): merge OIDC self-serve configuration
NicolasLopes7 Jul 28, 2026
6ccc628
refactor(ui): simplify OIDC configuration
NicolasLopes7 Jul 28, 2026
87edea6
fix(ui): address OIDC configure feedback
NicolasLopes7 Jul 28, 2026
680de51
chore(ui): remove feedback changeset
NicolasLopes7 Jul 28, 2026
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
8 changes: 8 additions & 0 deletions packages/clerk-js/src/core/resources/EnterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,11 @@ function oauthConfigFromJSON(data: EnterpriseOAuthConfigJSON): EnterpriseOAuthCo
name: data.name,
clientId: data.client_id,
providerKey: data.provider_key,
redirectUri: data.redirect_uri,
discoveryUrl: data.discovery_url,
authUrl: data.auth_url,
tokenUrl: data.token_url,
userInfoUrl: data.user_info_url,
logoPublicUrl: data.logo_public_url,
requiresPkce: data.requires_pkce,
createdAt: unixEpochToDate(data.created_at),
Expand All@@ -73,7 +77,11 @@ function oauthConfigToJSON(data: EnterpriseOAuthConfigResource): EnterpriseOAuth
name: data.name,
client_id: data.clientId,
provider_key: data.providerKey,
redirect_uri: data.redirectUri,
discovery_url: data.discoveryUrl,
auth_url: data.authUrl,
token_url: data.tokenUrl,
user_info_url: data.userInfoUrl,
logo_public_url: data.logoPublicUrl,
requires_pkce: data.requiresPkce,
created_at: data.createdAt?.getTime() ?? 0,
Expand Down
58 changes: 55 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,18 +240,70 @@ export const enUS: LocalizationResource = {
},
},
oidcCustom: {
claimsStep: {
headerSubtitle: 'Set the claims your identity provider includes in the ID token',
},
credentialsStep: {
headerSubtitle: 'Add your application credentials',
clientId: {
label: 'Client ID',
placeholder: 'Paste client ID here...',
},
clientSecret: {
label: 'Client secret',
placeholder: 'Paste client secret here...',
},
paragraph: 'In your identity provider’s OIDC application, retrieve these values.',
},
endpointsStep: {
headerSubtitle: 'Add your identity provider’s endpoints',
discoveryUrl: {
description:
'In your identity provider’s OIDC application, retrieve the discovery endpoint. Paste it below.',
label: 'Discovery endpoint',
placeholder: 'Paste URL here...',
},
manual: {
authUrl: {
label: 'Authorization URL',
placeholder: 'Paste URL here...',
},
description: 'In your identity provider’s OIDC application, retrieve these values.',
tokenUrl: {
label: 'Token URL',
placeholder: 'Paste URL here...',
},
userInfoUrl: {
label: 'User Info URL',
placeholder: 'Paste URL here...',
},
},
modes: {
ariaLabel: 'OIDC endpoint configuration method',
discoveryUrl: 'Add via discovery endpoint',
manual: 'Configure manually',
},
},
mainHeaderTitle: 'Configure your identity provider',
redirectUriStep: {
headerSubtitle: 'Create a new OIDC application in your identity provider’s dashboard',
paragraph:
'In your identity provider’s dashboard, create a new OIDC application that supports the authorization code grant type, and use the following redirect URI:',
claims: {
description: 'Ensure your ID token includes the following claims:',
table: {
columns: {
attribute: 'Clerk attribute',
claim: 'ID token claim',
},
rows: {
email: { attribute: 'Primary email' },
firstName: { attribute: 'First name' },
lastName: { attribute: 'Last name' },
subject: { attribute: 'External user ID' },
},
},
},
redirectUri: {
label: 'Authorized redirect URI',
},
},
},
samlCustom: {
Expand Down
10 changes: 10 additions & 0 deletions packages/shared/src/types/elementIds.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,16 @@ export type FieldId =
| 'idpMetadata'
| 'idpMetadataUrl'
| 'idpSsoUrl'
| 'discoveryUrl'
| 'authUrl'
| 'tokenUrl'
| 'userInfoUrl'
| 'clientId'
| 'clientSecret'
| 'redirectUri'
| 'oidcClientId'
| 'oidcClientSecret'
| 'oidcRedirectUri'
| 'acsUrl'
| 'spEntityId'
| 'web3WalletName'
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/types/enterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,11 @@ export interface EnterpriseOAuthConfigJSON {
name: string;
provider_key?: string;
client_id: string;
redirect_uri?: string;
discovery_url?: string;
auth_url?: string;
token_url?: string;
user_info_url?: string;
logo_public_url?: string | null;
requires_pkce?: boolean;
created_at: number;
Expand All@@ -112,7 +116,11 @@ export interface EnterpriseOAuthConfigResource {
name: string;
clientId: string;
providerKey?: string;
redirectUri?: string;
discoveryUrl?: string;
authUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
logoPublicUrl?: string | null;
requiresPkce?: boolean;
createdAt: Date | null;
Expand Down
56 changes: 53 additions & 3 deletions packages/shared/src/types/localization.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -1529,15 +1529,65 @@ export type __internal_LocalizationResource = {
mainHeaderTitle: LocalizationValue;
redirectUriStep: {
headerSubtitle: LocalizationValue;
};
claimsStep: {
headerSubtitle: LocalizationValue;
paragraph: LocalizationValue;
claims: {
description: LocalizationValue;
table: {
columns: {
attribute: LocalizationValue;
claim: LocalizationValue;
};
rows: {
email: { attribute: LocalizationValue };
firstName: { attribute: LocalizationValue };
lastName: { attribute: LocalizationValue };
subject: { attribute: LocalizationValue };
};
};
};
redirectUri: {
label: LocalizationValue;
};
};
endpointsStep: {
headerSubtitle: LocalizationValue;
discoveryUrl: {
description: LocalizationValue;
label: LocalizationValue;
placeholder: LocalizationValue;
};
manual: {
authUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
description: LocalizationValue;
tokenUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
userInfoUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
};
modes: {
ariaLabel: LocalizationValue;
discoveryUrl: LocalizationValue;
manual: LocalizationValue;
};
};
credentialsStep: {
headerSubtitle: LocalizationValue;
clientId: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
clientSecret: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
paragraph: LocalizationValue;
};
};
unsupportedProvider: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@ import {
areAllOrganizationDomainsVerified,
connectionBackingEmail,
isEnterpriseConnectionConfigured,
isOidcProvider,
organizationEnterpriseConnection,
} from '../organizationEnterpriseConnection';

Expand DownExpand Up@@ -62,7 +61,7 @@ const fullyConfiguredSaml = makeSamlConnection({
const configuredOidc = makeOauthConfig({ clientId: 'client_abc' });

const makeOidcConnection = (overrides: Partial<EnterpriseConnectionResource> = {}): EnterpriseConnectionResource =>
makeConnection({ provider: 'oidc_custom', samlConnection: null, oauthConfig: configuredOidc, ...overrides });
makeConnection({ provider: 'oauth_custom_acme', samlConnection: null, oauthConfig: configuredOidc, ...overrides });

// Builds the entity with sensible defaults; each test overrides what it cares
// about.
Expand All@@ -75,18 +74,6 @@ const derive = (overrides: Partial<Parameters<typeof organizationEnterpriseConne
});

describe('organizationEnterpriseConnection', () => {
describe('isOidcProvider', () => {
it('recognizes OIDC provider keys with the oidc_ prefix', () => {
expect(isOidcProvider('oidc_custom')).toBe(true);
expect(isOidcProvider('oidc_clerk_dev')).toBe(true);
});

it('rejects malformed OIDC provider keys', () => {
expect(isOidcProvider('oidc')).toBe(false);
expect(isOidcProvider('oidcfoo')).toBe(false);
});
});

describe('hasConnection', () => {
it('undefined connection → false', () => {
expect(derive({ connection: undefined }).hasConnection).toBe(false);
Expand All@@ -106,8 +93,10 @@ describe('organizationEnterpriseConnection', () => {
it('connection → its provider', () => {
expect(derive({ connection: makeConnection({ provider: 'saml_custom' }) }).provider).toBe('saml_custom');
});
it('carries a derived OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oidc_clerk_dev' }) }).provider).toBe('oidc_clerk_dev');
it('carries a custom OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oauth_custom_clerk_dev' }) }).provider).toBe(
'oauth_custom_clerk_dev',
);
});
});

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import type {

import type { EnterpriseConnectionProviderType, OidcProviderType } from '../types';

export const isOidcProvider = (provider: string): provider is OidcProviderType => provider.startsWith('oidc_');
export const isOidcProvider = (provider: string): provider is OidcProviderType =>
provider.startsWith('oidc_') || provider.startsWith('oauth_custom_');

/**
* The email whose domain backs the connection: the user's primary address if
Expand DownExpand Up@@ -56,7 +57,6 @@ export const isEnterpriseConnectionConfigured = (
if (!connection) {
return false;
}
// OIDC exposes only the client ID on the resource; the secret and manual endpoints are write-only.
if (isOidcProvider(connection.provider)) {
return Boolean(connection.oauthConfig?.clientId);
}
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
674669e
feat(ui): display OIDC authorized redirect URI
NicolasLopes7 Jul 21, 2026
7b8a088
feat(ui): add OIDC claims configuration step
NicolasLopes7 Jul 21, 2026
069f908
feat(ui): add OIDC endpoint configuration step
NicolasLopes7 Jul 21, 2026
ae23318
feat(ui): save OIDC endpoints before credentials
NicolasLopes7 Jul 21, 2026
f8bbba8
feat(ui): add OIDC credentials configuration step
NicolasLopes7 Jul 22, 2026
b8a4067
fix(ui): align OIDC credentials configuration
NicolasLopes7 Jul 22, 2026
0f47940
fix(ui): use OIDC redirect URI from FAPI
NicolasLopes7 Jul 22, 2026
84e8714
fix(ui): show OIDC debug redirect URI
NicolasLopes7 Jul 22, 2026
0f9ef24
remove debug URI field
NicolasLopes7 Jul 23, 2026
eb3360e
refactor: move step into separate components rather than single-file
NicolasLopes7 Jul 23, 2026
67dc5cd
gymnastics
NicolasLopes7 Jul 23, 2026
af6b470
fix(ui): recognize custom OIDC provider keys
NicolasLopes7 Jul 23, 2026
5fc65c8
fix(ui): remove dead OIDC scopes control
NicolasLopes7 Jul 27, 2026
284c7ad
fix(ui): simplify OIDC setup flow
NicolasLopes7 Jul 28, 2026
b74a8c6
fix(ui): highlight OIDC token claims
NicolasLopes7 Jul 28, 2026
d25f3c0
fix(ui): separate OIDC token claims
NicolasLopes7 Jul 28, 2026
63d7c94
fix(ui): inline OIDC token claim guidance
NicolasLopes7 Jul 28, 2026
d546a93
fix(ui): show OIDC claims after redirect URI
NicolasLopes7 Jul 28, 2026
d39578c
fix(ui): address OIDC review feedback
NicolasLopes7 Jul 28, 2026
b41bc8d
chore(ui): merge OIDC self-serve configuration
NicolasLopes7 Jul 28, 2026
6ccc628
refactor(ui): simplify OIDC configuration
NicolasLopes7 Jul 28, 2026
87edea6
fix(ui): address OIDC configure feedback
NicolasLopes7 Jul 28, 2026
680de51
chore(ui): remove feedback changeset
NicolasLopes7 Jul 28, 2026
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
8 changes: 8 additions & 0 deletions packages/clerk-js/src/core/resources/EnterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,11 @@ function oauthConfigFromJSON(data: EnterpriseOAuthConfigJSON): EnterpriseOAuthCo
name: data.name,
clientId: data.client_id,
providerKey: data.provider_key,
redirectUri: data.redirect_uri,
discoveryUrl: data.discovery_url,
authUrl: data.auth_url,
tokenUrl: data.token_url,
userInfoUrl: data.user_info_url,
logoPublicUrl: data.logo_public_url,
requiresPkce: data.requires_pkce,
createdAt: unixEpochToDate(data.created_at),
Expand All@@ -73,7 +77,11 @@ function oauthConfigToJSON(data: EnterpriseOAuthConfigResource): EnterpriseOAuth
name: data.name,
client_id: data.clientId,
provider_key: data.providerKey,
redirect_uri: data.redirectUri,
discovery_url: data.discoveryUrl,
auth_url: data.authUrl,
token_url: data.tokenUrl,
user_info_url: data.userInfoUrl,
logo_public_url: data.logoPublicUrl,
requires_pkce: data.requiresPkce,
created_at: data.createdAt?.getTime() ?? 0,
Expand Down
58 changes: 55 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,18 +240,70 @@ export const enUS: LocalizationResource = {
},
},
oidcCustom: {
claimsStep: {
headerSubtitle: 'Set the claims your identity provider includes in the ID token',
},
credentialsStep: {
headerSubtitle: 'Add your application credentials',
clientId: {
label: 'Client ID',
placeholder: 'Paste client ID here...',
},
clientSecret: {
label: 'Client secret',
placeholder: 'Paste client secret here...',
},
paragraph: 'In your identity provider’s OIDC application, retrieve these values.',
},
endpointsStep: {
headerSubtitle: 'Add your identity provider’s endpoints',
discoveryUrl: {
description:
'In your identity provider’s OIDC application, retrieve the discovery endpoint. Paste it below.',
label: 'Discovery endpoint',
placeholder: 'Paste URL here...',
},
manual: {
authUrl: {
label: 'Authorization URL',
placeholder: 'Paste URL here...',
},
description: 'In your identity provider’s OIDC application, retrieve these values.',
tokenUrl: {
label: 'Token URL',
placeholder: 'Paste URL here...',
},
userInfoUrl: {
label: 'User Info URL',
placeholder: 'Paste URL here...',
},
},
modes: {
ariaLabel: 'OIDC endpoint configuration method',
discoveryUrl: 'Add via discovery endpoint',
manual: 'Configure manually',
},
},
mainHeaderTitle: 'Configure your identity provider',
redirectUriStep: {
headerSubtitle: 'Create a new OIDC application in your identity provider’s dashboard',
paragraph:
'In your identity provider’s dashboard, create a new OIDC application that supports the authorization code grant type, and use the following redirect URI:',
claims: {
description: 'Ensure your ID token includes the following claims:',
table: {
columns: {
attribute: 'Clerk attribute',
claim: 'ID token claim',
},
rows: {
email: { attribute: 'Primary email' },
firstName: { attribute: 'First name' },
lastName: { attribute: 'Last name' },
subject: { attribute: 'External user ID' },
},
},
},
redirectUri: {
label: 'Authorized redirect URI',
},
},
},
samlCustom: {
Expand Down
10 changes: 10 additions & 0 deletions packages/shared/src/types/elementIds.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,16 @@ export type FieldId =
| 'idpMetadata'
| 'idpMetadataUrl'
| 'idpSsoUrl'
| 'discoveryUrl'
| 'authUrl'
| 'tokenUrl'
| 'userInfoUrl'
| 'clientId'
| 'clientSecret'
| 'redirectUri'
| 'oidcClientId'
| 'oidcClientSecret'
| 'oidcRedirectUri'
| 'acsUrl'
| 'spEntityId'
| 'web3WalletName'
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/types/enterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,11 @@ export interface EnterpriseOAuthConfigJSON {
name: string;
provider_key?: string;
client_id: string;
redirect_uri?: string;
discovery_url?: string;
auth_url?: string;
token_url?: string;
user_info_url?: string;
logo_public_url?: string | null;
requires_pkce?: boolean;
created_at: number;
Expand All@@ -112,7 +116,11 @@ export interface EnterpriseOAuthConfigResource {
name: string;
clientId: string;
providerKey?: string;
redirectUri?: string;
discoveryUrl?: string;
authUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
logoPublicUrl?: string | null;
requiresPkce?: boolean;
createdAt: Date | null;
Expand Down
56 changes: 53 additions & 3 deletions packages/shared/src/types/localization.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -1529,15 +1529,65 @@ export type __internal_LocalizationResource = {
mainHeaderTitle: LocalizationValue;
redirectUriStep: {
headerSubtitle: LocalizationValue;
};
claimsStep: {
headerSubtitle: LocalizationValue;
paragraph: LocalizationValue;
claims: {
description: LocalizationValue;
table: {
columns: {
attribute: LocalizationValue;
claim: LocalizationValue;
};
rows: {
email: { attribute: LocalizationValue };
firstName: { attribute: LocalizationValue };
lastName: { attribute: LocalizationValue };
subject: { attribute: LocalizationValue };
};
};
};
redirectUri: {
label: LocalizationValue;
};
};
endpointsStep: {
headerSubtitle: LocalizationValue;
discoveryUrl: {
description: LocalizationValue;
label: LocalizationValue;
placeholder: LocalizationValue;
};
manual: {
authUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
description: LocalizationValue;
tokenUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
userInfoUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
};
modes: {
ariaLabel: LocalizationValue;
discoveryUrl: LocalizationValue;
manual: LocalizationValue;
};
};
credentialsStep: {
headerSubtitle: LocalizationValue;
clientId: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
clientSecret: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
paragraph: LocalizationValue;
};
};
unsupportedProvider: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@ import {
areAllOrganizationDomainsVerified,
connectionBackingEmail,
isEnterpriseConnectionConfigured,
isOidcProvider,
organizationEnterpriseConnection,
} from '../organizationEnterpriseConnection';

Expand DownExpand Up@@ -62,7 +61,7 @@ const fullyConfiguredSaml = makeSamlConnection({
const configuredOidc = makeOauthConfig({ clientId: 'client_abc' });

const makeOidcConnection = (overrides: Partial<EnterpriseConnectionResource> = {}): EnterpriseConnectionResource =>
makeConnection({ provider: 'oidc_custom', samlConnection: null, oauthConfig: configuredOidc, ...overrides });
makeConnection({ provider: 'oauth_custom_acme', samlConnection: null, oauthConfig: configuredOidc, ...overrides });

// Builds the entity with sensible defaults; each test overrides what it cares
// about.
Expand All@@ -75,18 +74,6 @@ const derive = (overrides: Partial<Parameters<typeof organizationEnterpriseConne
});

describe('organizationEnterpriseConnection', () => {
describe('isOidcProvider', () => {
it('recognizes OIDC provider keys with the oidc_ prefix', () => {
expect(isOidcProvider('oidc_custom')).toBe(true);
expect(isOidcProvider('oidc_clerk_dev')).toBe(true);
});

it('rejects malformed OIDC provider keys', () => {
expect(isOidcProvider('oidc')).toBe(false);
expect(isOidcProvider('oidcfoo')).toBe(false);
});
});

describe('hasConnection', () => {
it('undefined connection → false', () => {
expect(derive({ connection: undefined }).hasConnection).toBe(false);
Expand All@@ -106,8 +93,10 @@ describe('organizationEnterpriseConnection', () => {
it('connection → its provider', () => {
expect(derive({ connection: makeConnection({ provider: 'saml_custom' }) }).provider).toBe('saml_custom');
});
it('carries a derived OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oidc_clerk_dev' }) }).provider).toBe('oidc_clerk_dev');
it('carries a custom OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oauth_custom_clerk_dev' }) }).provider).toBe(
'oauth_custom_clerk_dev',
);
});
});

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import type {

import type { EnterpriseConnectionProviderType, OidcProviderType } from '../types';

export const isOidcProvider = (provider: string): provider is OidcProviderType => provider.startsWith('oidc_');
export const isOidcProvider = (provider: string): provider is OidcProviderType =>
provider.startsWith('oidc_') || provider.startsWith('oauth_custom_');

/**
* The email whose domain backs the connection: the user's primary address if
Expand DownExpand Up@@ -56,7 +57,6 @@ export const isEnterpriseConnectionConfigured = (
if (!connection) {
return false;
}
// OIDC exposes only the client ID on the resource; the secret and manual endpoints are write-only.
if (isOidcProvider(connection.provider)) {
return Boolean(connection.oauthConfig?.clientId);
}
Expand Down
Loading
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
674669e
feat(ui): display OIDC authorized redirect URI
NicolasLopes7 Jul 21, 2026
7b8a088
feat(ui): add OIDC claims configuration step
NicolasLopes7 Jul 21, 2026
069f908
feat(ui): add OIDC endpoint configuration step
NicolasLopes7 Jul 21, 2026
ae23318
feat(ui): save OIDC endpoints before credentials
NicolasLopes7 Jul 21, 2026
f8bbba8
feat(ui): add OIDC credentials configuration step
NicolasLopes7 Jul 22, 2026
b8a4067
fix(ui): align OIDC credentials configuration
NicolasLopes7 Jul 22, 2026
0f47940
fix(ui): use OIDC redirect URI from FAPI
NicolasLopes7 Jul 22, 2026
84e8714
fix(ui): show OIDC debug redirect URI
NicolasLopes7 Jul 22, 2026
0f9ef24
remove debug URI field
NicolasLopes7 Jul 23, 2026
eb3360e
refactor: move step into separate components rather than single-file
NicolasLopes7 Jul 23, 2026
67dc5cd
gymnastics
NicolasLopes7 Jul 23, 2026
af6b470
fix(ui): recognize custom OIDC provider keys
NicolasLopes7 Jul 23, 2026
5fc65c8
fix(ui): remove dead OIDC scopes control
NicolasLopes7 Jul 27, 2026
284c7ad
fix(ui): simplify OIDC setup flow
NicolasLopes7 Jul 28, 2026
b74a8c6
fix(ui): highlight OIDC token claims
NicolasLopes7 Jul 28, 2026
d25f3c0
fix(ui): separate OIDC token claims
NicolasLopes7 Jul 28, 2026
63d7c94
fix(ui): inline OIDC token claim guidance
NicolasLopes7 Jul 28, 2026
d546a93
fix(ui): show OIDC claims after redirect URI
NicolasLopes7 Jul 28, 2026
d39578c
fix(ui): address OIDC review feedback
NicolasLopes7 Jul 28, 2026
b41bc8d
chore(ui): merge OIDC self-serve configuration
NicolasLopes7 Jul 28, 2026
6ccc628
refactor(ui): simplify OIDC configuration
NicolasLopes7 Jul 28, 2026
87edea6
fix(ui): address OIDC configure feedback
NicolasLopes7 Jul 28, 2026
680de51
chore(ui): remove feedback changeset
NicolasLopes7 Jul 28, 2026
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
8 changes: 8 additions & 0 deletions packages/clerk-js/src/core/resources/EnterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,11 @@ function oauthConfigFromJSON(data: EnterpriseOAuthConfigJSON): EnterpriseOAuthCo
name: data.name,
clientId: data.client_id,
providerKey: data.provider_key,
redirectUri: data.redirect_uri,
discoveryUrl: data.discovery_url,
authUrl: data.auth_url,
tokenUrl: data.token_url,
userInfoUrl: data.user_info_url,
logoPublicUrl: data.logo_public_url,
requiresPkce: data.requires_pkce,
createdAt: unixEpochToDate(data.created_at),
Expand All@@ -73,7 +77,11 @@ function oauthConfigToJSON(data: EnterpriseOAuthConfigResource): EnterpriseOAuth
name: data.name,
client_id: data.clientId,
provider_key: data.providerKey,
redirect_uri: data.redirectUri,
discovery_url: data.discoveryUrl,
auth_url: data.authUrl,
token_url: data.tokenUrl,
user_info_url: data.userInfoUrl,
logo_public_url: data.logoPublicUrl,
requires_pkce: data.requiresPkce,
created_at: data.createdAt?.getTime() ?? 0,
Expand Down
58 changes: 55 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,18 +240,70 @@ export const enUS: LocalizationResource = {
},
},
oidcCustom: {
claimsStep: {
headerSubtitle: 'Set the claims your identity provider includes in the ID token',
},
credentialsStep: {
headerSubtitle: 'Add your application credentials',
clientId: {
label: 'Client ID',
placeholder: 'Paste client ID here...',
},
clientSecret: {
label: 'Client secret',
placeholder: 'Paste client secret here...',
},
paragraph: 'In your identity provider’s OIDC application, retrieve these values.',
},
endpointsStep: {
headerSubtitle: 'Add your identity provider’s endpoints',
discoveryUrl: {
description:
'In your identity provider’s OIDC application, retrieve the discovery endpoint. Paste it below.',
label: 'Discovery endpoint',
placeholder: 'Paste URL here...',
},
manual: {
authUrl: {
label: 'Authorization URL',
placeholder: 'Paste URL here...',
},
description: 'In your identity provider’s OIDC application, retrieve these values.',
tokenUrl: {
label: 'Token URL',
placeholder: 'Paste URL here...',
},
userInfoUrl: {
label: 'User Info URL',
placeholder: 'Paste URL here...',
},
},
modes: {
ariaLabel: 'OIDC endpoint configuration method',
discoveryUrl: 'Add via discovery endpoint',
manual: 'Configure manually',
},
},
mainHeaderTitle: 'Configure your identity provider',
redirectUriStep: {
headerSubtitle: 'Create a new OIDC application in your identity provider’s dashboard',
paragraph:
'In your identity provider’s dashboard, create a new OIDC application that supports the authorization code grant type, and use the following redirect URI:',
claims: {
description: 'Ensure your ID token includes the following claims:',
table: {
columns: {
attribute: 'Clerk attribute',
claim: 'ID token claim',
},
rows: {
email: { attribute: 'Primary email' },
firstName: { attribute: 'First name' },
lastName: { attribute: 'Last name' },
subject: { attribute: 'External user ID' },
},
},
},
redirectUri: {
label: 'Authorized redirect URI',
},
},
},
samlCustom: {
Expand Down
10 changes: 10 additions & 0 deletions packages/shared/src/types/elementIds.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,16 @@ export type FieldId =
| 'idpMetadata'
| 'idpMetadataUrl'
| 'idpSsoUrl'
| 'discoveryUrl'
| 'authUrl'
| 'tokenUrl'
| 'userInfoUrl'
| 'clientId'
| 'clientSecret'
| 'redirectUri'
| 'oidcClientId'
| 'oidcClientSecret'
| 'oidcRedirectUri'
| 'acsUrl'
| 'spEntityId'
| 'web3WalletName'
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/types/enterpriseConnection.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,11 @@ export interface EnterpriseOAuthConfigJSON {
name: string;
provider_key?: string;
client_id: string;
redirect_uri?: string;
discovery_url?: string;
auth_url?: string;
token_url?: string;
user_info_url?: string;
logo_public_url?: string | null;
requires_pkce?: boolean;
created_at: number;
Expand All@@ -112,7 +116,11 @@ export interface EnterpriseOAuthConfigResource {
name: string;
clientId: string;
providerKey?: string;
redirectUri?: string;
discoveryUrl?: string;
authUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
logoPublicUrl?: string | null;
requiresPkce?: boolean;
createdAt: Date | null;
Expand Down
56 changes: 53 additions & 3 deletions packages/shared/src/types/localization.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -1529,15 +1529,65 @@ export type __internal_LocalizationResource = {
mainHeaderTitle: LocalizationValue;
redirectUriStep: {
headerSubtitle: LocalizationValue;
};
claimsStep: {
headerSubtitle: LocalizationValue;
paragraph: LocalizationValue;
claims: {
description: LocalizationValue;
table: {
columns: {
attribute: LocalizationValue;
claim: LocalizationValue;
};
rows: {
email: { attribute: LocalizationValue };
firstName: { attribute: LocalizationValue };
lastName: { attribute: LocalizationValue };
subject: { attribute: LocalizationValue };
};
};
};
redirectUri: {
label: LocalizationValue;
};
};
endpointsStep: {
headerSubtitle: LocalizationValue;
discoveryUrl: {
description: LocalizationValue;
label: LocalizationValue;
placeholder: LocalizationValue;
};
manual: {
authUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
description: LocalizationValue;
tokenUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
userInfoUrl: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
};
modes: {
ariaLabel: LocalizationValue;
discoveryUrl: LocalizationValue;
manual: LocalizationValue;
};
};
credentialsStep: {
headerSubtitle: LocalizationValue;
clientId: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
clientSecret: {
label: LocalizationValue;
placeholder: LocalizationValue;
};
paragraph: LocalizationValue;
};
};
unsupportedProvider: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,6 @@ import {
areAllOrganizationDomainsVerified,
connectionBackingEmail,
isEnterpriseConnectionConfigured,
isOidcProvider,
organizationEnterpriseConnection,
} from '../organizationEnterpriseConnection';

Expand DownExpand Up@@ -62,7 +61,7 @@ const fullyConfiguredSaml = makeSamlConnection({
const configuredOidc = makeOauthConfig({ clientId: 'client_abc' });

const makeOidcConnection = (overrides: Partial<EnterpriseConnectionResource> = {}): EnterpriseConnectionResource =>
makeConnection({ provider: 'oidc_custom', samlConnection: null, oauthConfig: configuredOidc, ...overrides });
makeConnection({ provider: 'oauth_custom_acme', samlConnection: null, oauthConfig: configuredOidc, ...overrides });

// Builds the entity with sensible defaults; each test overrides what it cares
// about.
Expand All@@ -75,18 +74,6 @@ const derive = (overrides: Partial<Parameters<typeof organizationEnterpriseConne
});

describe('organizationEnterpriseConnection', () => {
describe('isOidcProvider', () => {
it('recognizes OIDC provider keys with the oidc_ prefix', () => {
expect(isOidcProvider('oidc_custom')).toBe(true);
expect(isOidcProvider('oidc_clerk_dev')).toBe(true);
});

it('rejects malformed OIDC provider keys', () => {
expect(isOidcProvider('oidc')).toBe(false);
expect(isOidcProvider('oidcfoo')).toBe(false);
});
});

describe('hasConnection', () => {
it('undefined connection → false', () => {
expect(derive({ connection: undefined }).hasConnection).toBe(false);
Expand All@@ -106,8 +93,10 @@ describe('organizationEnterpriseConnection', () => {
it('connection → its provider', () => {
expect(derive({ connection: makeConnection({ provider: 'saml_custom' }) }).provider).toBe('saml_custom');
});
it('carries a derived OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oidc_clerk_dev' }) }).provider).toBe('oidc_clerk_dev');
it('carries a custom OIDC key verbatim', () => {
expect(derive({ connection: makeConnection({ provider: 'oauth_custom_clerk_dev' }) }).provider).toBe(
'oauth_custom_clerk_dev',
);
});
});

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import type {

import type { EnterpriseConnectionProviderType, OidcProviderType } from '../types';

export const isOidcProvider = (provider: string): provider is OidcProviderType => provider.startsWith('oidc_');
export const isOidcProvider = (provider: string): provider is OidcProviderType =>
provider.startsWith('oidc_') || provider.startsWith('oauth_custom_');

/**
* The email whose domain backs the connection: the user's primary address if
Expand DownExpand Up@@ -56,7 +57,6 @@ export const isEnterpriseConnectionConfigured = (
if (!connection) {
return false;
}
// OIDC exposes only the client ID on the resource; the secret and manual endpoints are write-only.
if (isOidcProvider(connection.provider)) {
return Boolean(connection.oauthConfig?.clientId);
}
Expand Down
Loading
Loading