Skip to content

feat(ui,clerk-js,shared,localizations): manage trusted identity providers from OrganizationProfile - #11065

Draft
brkalow wants to merge 4 commits into
mainfrom
feat/orgprofile-trusted-identity-providers
Draft

brkalow wants to merge 4 commits into
mainfrom
feat/orgprofile-trusted-identity-providers

Conversation

@brkalow

@brkalow brkalow commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Description

Adds a "Trusted identity providers" section to the Security page of <OrganizationProfile /> (Linear AIE-2146). It is the self-serve path for MCP enterprise-managed authorization: an organization admin trusts their company's identity provider (for example Okta) as an ID-JAG issuer for their organization, and AI clients can then reach the application's MCP server for that organization's members without a consent screen. It sits next to self-serve enterprise SSO on the same page.

Depends on unmerged backend work. This needs the clerk_go stack for MCP enterprise-managed authorization (ID-JAG): the FAPI /v1/organizations/{id}/oauth_trusted_issuers routes, the org:sys_trusted_issuers:manage system permission, access_token_ttl, and the optional issuer on create. Keep this PR in draft until they merge.

clerk_go PRs:

What admins see:

  • The section shows only to members with org:sys_trusted_issuers:manage. Clerk seeds that permission only when the instance has the ID-JAG grant turned on, and the permission alone is enough to show the Security tab. If the routes answer 403 feature_not_enabled, the section hides itself.
  • Each provider is listed with a status badge (Working, Failing, Never used) and when it was last used or refused. A failing provider shows the refusal code and the value the token carried (for example audience_mismatch (received https://other.example.com)), with a hint to check the app's settings in the identity provider.
  • Add, edit and remove use the same inline cards as verified domains. Edit covers the JWKS URL, the enterprise connection, the token lifetime cap and the allowed client IDs; the issuer and tenant can't change after creation.
  • The connection picker lists the organization's enterprise connections. When the picked connection is OIDC with a discovery URL, the issuer is optional and Clerk reads it from the connection.
  • A Claude organization's issuer (https://identity.anthropic.com/issuers/<id>, matched with the same rule clerk_go uses) hides the tenant, JWKS URL and connection fields, with a caption explaining why, and never sends them. Clerk reads Claude's keys from the issuer itself and matches members by verified email, and it refuses those three fields with a 422.
  • "Token lifetime" caps how long access tokens from that provider live (presets from 5 minutes to 7 days, or no cap). It never extends the OAuth client's own lifetime.

For custom flows, clerk-js exposes the routes on the organization:

const { organization } = useOrganization();

const { data: issuers } = await organization.oauthTrustedIssuers.getIssuers();

const issuer = await organization.oauthTrustedIssuers.createIssuer({
  issuer: 'https://acme.okta.com',
  enterpriseConnectionId: 'entconn_123', // optional; with an OIDC connection the issuer can be omitted
  allowedClientIds: ['client_abc'], // empty or omitted admits every client
  accessTokenTtl: 3600, // seconds; omit for no cap
});

await organization.oauthTrustedIssuers.updateIssuer(issuer.id, {
  enterpriseConnectionId: null, // unlink the connection
  allowedClientIds: [], // admit every client
  accessTokenTtl: null, // remove the cap
});

await organization.oauthTrustedIssuers.deleteIssuer(issuer.id);

Where the API shaped the UI, and where review would help:

  • A JWKS URL can be replaced on update but never reset to the discovered one, so the edit form requires it and only sends it when changed.
  • The backend lets an organization's issuer link to instance-level connections, but the SDK only lists the organization's own, so the picker can't offer them. An issuer already linked to one shows the connection ID.
  • Allowed client IDs are a comma- or space-separated text field rather than a tag input, because the existing tag input is built for email addresses.
  • Token lifetime offers presets only, while the API accepts any value from 60 seconds to a year. A value set elsewhere still shows and is kept. I'd like a call on whether presets are enough.
  • The Security tab opens on org:sys_trusted_issuers:manage alone. If an instance turns the ID-JAG grant off but members keep the permission, a member with no other Security capability sees an empty page, since the section hides on feature_not_enabled. That depends on whether clerk_go removes the permission with the grant.

To try it, you need a clerk_go build from the stack above with the ID-JAG grant on for the instance, and a member holding org:sys_trusted_issuers:manage. Open <OrganizationProfile />, go to Security, and add a provider.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

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

✎

🤖 Generated with Claude Code

brkalow and others added 3 commits November 30, 2026 20:57
…ders from OrganizationProfile

Add a "Trusted identity providers" section to the Security page of
<OrganizationProfile />, gated on org:sys_trusted_issuers:manage. Admins
can trust their IdP as an ID-JAG issuer, see each issuer's status and
last use or refusal, and edit or remove it.

Expose organization.oauthTrustedIssuers in clerk-js for the FAPI
/organizations/{id}/oauth_trusted_issuers routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…issuer for trusted identity providers

Cover two clerk_go API additions in the trusted identity providers section:

- access_token_ttl: a "Token lifetime" select on create and edit. On update,
  null or 0 removes the cap.
- Optional issuer on create when the picked enterprise connection is OIDC with
  a discovery URL. The connection picker now comes first, and the issuer field
  becomes optional with a caption naming the connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed issuer form

The enterprise connection and token lifetime pickers are not form
controls, so a 422 naming enterprise_connection_id or access_token_ttl
matched no field and was dropped, leaving the form open with no message.
Show it as the card error instead, as SelectProviderStep does.

Also fall back to the "Never used" badge for a status the UI does not
know, so a new backend state cannot crash the Security page.

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

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Dec 1, 2026 8:35pm UTC
mosaic-docs Ready Ready Preview Dec 1, 2026 8:35pm UTC
swingset Ready Ready Preview Dec 1, 2026 8:35pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@pkg-pr-new

pkg-pr-new Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0c05e51

…s in the trusted issuer form

A Claude organization's issuer (https://identity.anthropic.com/issuers/<id>)
takes no tenant, JWKS URL or enterprise connection, and clerk_go returns 422
on each. The form now recognizes that issuer shape, hides those inputs,
explains why, and never sends them, on create or edit.

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

changeset-bot Bot commented Dec 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0c05e51

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

This PR includes changesets to release 24 packages
Name Type
@clerk/clerk-js Minor
@clerk/shared Minor
@clerk/ui Minor
@clerk/localizations Minor
@clerk/chrome-extension Patch
@clerk/electron Patch
@clerk/expo Patch
@clerk/mosaic Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/swingset Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/vue Patch
@clerk/mosaic-docs Patch

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

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

This branch was successfully deployed

2 active deployments
Preview – swingset — 0c05e51e Deployed Dec 1, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 0c05e51e Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant