Manage OAuth clients with Client ID Metadata Documents, Beta
A Client ID Metadata Document (CIMD) lets an OAuth client use an HTTPS URL as its client_id. The URL serves a JSON document that describes the client, including its name and allowed redirect URIs. This lets Clerk identify a client without requiring it to create a registration through Dynamic Client Registration.
Clerk's current OAuth implementation supports Client ID Metadata Documents. You control client admission from the Clerk Dashboard: you can explicitly allow individual clients or allow previously unknown clients to connect.
While CIMD is in beta, CIMD client management is available only after CIMD is enabled for your account. Manage CIMD clients from the shared Applications tab on the OAuth applications page. Applications that still use Clerk's legacy OAuth implementation don't support CIMD clients.
Client metadata requirements
The following example demonstrates the minimum metadata that a client can publish:
{
"client_id": "https://client.example.com/oauth/client-metadata.json",
"client_name": "Example client",
"redirect_uris": ["https://client.example.com/oauth/callback"],
"token_endpoint_auth_method": "none"
}For Clerk to accept the document:
- The
client_idmust be an HTTPS URL with a path. - The document's
client_idmust exactly match the URL Clerk fetched. client_nameand at least oneredirect_urisentry must be present.- The requested
redirect_urimust exactly match an entry inredirect_uris. - The client must be public. Clerk rejects metadata that contains a client secret or selects a secret-based token endpoint authentication method.
Clerk treats all CIMD clients as public OAuth clients, requires PKCE (Proof Key for Code Exchange) with the S256 method, and always shows the OAuth consent screen.
Explicitly allow a client
Explicitly allowed clients can start OAuth flows regardless of the unknown-client policy.
Select the Applications tab
In the Clerk Dashboard, navigate to the OAuth applications page and select the Applications tab.
Add the client
Select Add application → Pre-register CIMD client. Then configure:
- Client ID URL: The HTTPS URL that serves the client's metadata document.
- Scopes: The scopes that the client may request from this Clerk instance.
Clerk reads the client's name and logo from its metadata document. The document can't grant itself additional scopes, so the scopes selected in the Clerk Dashboard remain authoritative. Clerk always includes offline_access for CIMD clients.
Allow the client
Select Allow client. Clerk fetches the metadata document and records the client as Explicitly allowed.
If Clerk can't fetch the document, the client remains explicitly allowed and its metadata status displays Error. The OAuth flow can't complete until Clerk can resolve a valid metadata document. From the client's actions menu, select Refresh metadata after the document becomes available.
Configure CIMD settings
On the OAuth applications page, select the Settings tab. Under Client onboarding, configure how Clerk publishes CIMD support and which clients may connect:
Publish CIMD support is disabled by default. When enabled, Client admission defaults to Any compatible CIMD client. Client admission settings let you further customize CIMD client behavior:
- Any compatible CIMD client: Allows new clients to connect without pre-registration.
- Pre-registered and previously connected clients: New clients must be pre-registered. Clients accepted before this rule remain allowed.
- Pre-registered clients only: Also blocks clients that were previously accepted without pre-registration.
Blocking an implicitly allowed client doesn't delete its record or revoke tokens that Clerk already issued.
You can explicitly allow an implicit or blocked client from its actions menu. Explicitly allowed clients can connect with any Client admission option.
Review and manage clients
On the Applications tab, you can review each CIMD client's:
- Client ID URL and display name
- Allowed scopes
- Admission status
- Metadata fetch status
- Creation date
The admission statuses are:
From a client's actions menu, you can:
- Explicitly allow an implicit or blocked client.
- Edit the scopes it may request.
- Refresh its metadata.
- Delete the saved client.
Feedback
Last updated on