Skip to content
Docs

Add AgentID to Clerk

Scroll down and follow each step in order.

On this page

Step 1 of 8

Register an AgentID client

Open AgentID console

Open the form with Register client, then enter your app name.

Redirect URI: https://your-clerk-subdomain.clerk.accounts.dev/v1/oauth_callbackDon’t know your Clerk subdomain? Update this in step 6.

Submit with Register client.

The AgentID client form with Clerk's callback address entered as the redirect URI and the Register client button at the bottom.

Step 2 of 8

Copy both keys

Copy Client ID and Client secret. The secret is shown once.

The AgentID client secret window with copy buttons for the client ID and client secret.

Step 3 of 8

Open Clerk's SSO setup

Open Clerk dashboard
ConfigureUser & authenticationSSO connectionsAdd connectionFor all usersCustom provider
Clerk's SSO connections page with Add connection open and For all users selected.

Step 4 of 8

Fill in the provider form

Name

AgentID

Key

agentid

Discovery Endpoint

https://auth.agentid.com/.well-known/openid-configuration

Client ID

Paste the Client ID from step 2.

Client secret

Paste the Client secret from step 2.

Use PKCE: onAdd connection
Clerk's Custom provider form with Name, Key, Discovery Endpoint, Client ID, Client secret, Use PKCE, and Add connection.

Step 5 of 8

Add the scopes

From Overview, open the SSO tab.

Scopes
openid email profile

Need the owner’s name and email? Copy all five scopes:

Scopes with owner info
openid email profile owner_profile owner_email
Clerk's Scopes field with openid, email, profile, owner_profile, and owner_email added.

Step 6 of 8

Use Clerk's exact redirect URI

In Clerk

Copy the Authorized redirect URI.

In AgentID console

Open Your client and paste it into Redirect URI.

Click Save.

Clerk's Authorized redirect URI with a copy button beside it.

Step 7 of 8

Turn on AgentID sign-in

Under Logo, click Upload image and choose a square PNG from the brand page.

When ready, toggle Enable for sign-up and sign-in on.

Clerk's AgentID connection with Enable for sign-up and sign-in turned on.

Step 8 of 8

Test the sign-in

Open your sign-in page.

AgentIDApproval steps
A Clerk sign-in page with an AgentID button.

Using your own sign-in button? Copy this:

Sign in
signIn.sso({
  strategy: 'oauth_custom_agentid',
  redirectCallbackUrl: '/sso-callback',
  redirectUrl: '/',
})