-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add docs for third party OIDC providers
- Loading branch information
Showing
3 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
docs/authentication/enterprise-connections/oidc/custom-provider.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: Add a custom OIDC Provider as an Enterprise Connection | ||
description: Learn how to integrate a custom OIDC provider with Clerk for Enterprise SSO. | ||
--- | ||
<TutorialHero | ||
beforeYouStart={[ | ||
{ | ||
title: "Add the Enhanced Authentication add-on to your Pro plan", | ||
link: "/pricing", | ||
icon: "plus-circle", | ||
}, | ||
{ | ||
title: "Enable email address as an identifier for your app", | ||
link: "/docs/authentication/configuration/sign-up-sign-in-options#identifiers", | ||
icon: "key", | ||
}, | ||
]} | ||
> | ||
- Use a third-party OIDC provider to authenticate users with Enterprise SSO | ||
</TutorialHero> | ||
<Steps> | ||
### Set up an Enterprise Connection in Clerk | ||
|
||
To create an Enterprise connection in Clerk: | ||
|
||
1. In the Clerk Dashboard, navigate to the [**SSO Connections**](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections) page. | ||
1. Select **Add connection** and select **For specific domains**. | ||
1. Under **Third party**, select **OIDC**. | ||
1. Add the **Name** of the connection. | ||
1. Add the **Key** of the provider. This is the provider's unique identifier (cannot be changed after creation). | ||
1. Add the **Specific Domain** that you want to allow this connection for. This is the domain of the users you want to allow to sign in to your application. | ||
1. Select **Add connection**. You will be redirected to the connection's configuration page. | ||
|
||
The next steps involve configuring both your Identity Provider (IdP) and Clerk. Keep both dashboards open as you'll need to reference them. | ||
|
||
### Configure your Identity Provider | ||
|
||
If needed, create a new application in your IdP. Then, copy the **Authorized redirect URLs** from the connection's configuration page and add them to your IdP's whitelisted URLs. | ||
|
||
### Configure the connection | ||
|
||
Locate your application's Client ID, Client Secret, and discovery endpoint in your IdP's settings. Copy these values to the **Identity Provider Configuration** section on the connection's configuration page. | ||
|
||
Finally set up the minimum required scopes according to the provider's documentation. The most commonly used OIDC scopes are `openid`, `email`, and `profile`. | ||
|
||
### Attribute mapping (optional) | ||
|
||
If your provider returns claims in a non-standard format, under **Attribute mapping**, configure the mapping to match your provider's claim format. | ||
|
||
> [!CAUTION] | ||
> OIDC Enterprise connections require the `email_verified` claim to verify email ownership. For providers that don't return this claim, you can set a default value of true - but ensure you fully trust the Identity Provider before doing so to prevent exploits like [nOAuth](https://www.descope.com/blog/post/noauth). | ||
### Enable the connection for Clerk | ||
|
||
To make the connection available for your users to authenticate with: | ||
|
||
1. In the Clerk Dashboard, you should still have the connection's configuration page open. If not, navigate to the [**SSO Connections**](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections) page and select the connection. | ||
1. Toggle on **Enable connection** and select **Save**. | ||
</Steps> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters