|
1 | 1 | ---
|
2 | 2 | title: Add Box as a social connection
|
3 |
| -description: Learn how to set up social connection with Box. |
| 3 | +description: Learn how to allow users to sign up and sign in to your Clerk app with their Box account using OAuth. |
4 | 4 | ---
|
5 | 5 |
|
6 |
| -How to set up social connection with Box |
| 6 | +<TutorialHero |
| 7 | + beforeYouStart={[ |
| 8 | + { |
| 9 | + title: "A Clerk app is required.", |
| 10 | + link: "/docs/quickstarts/setup-clerk", |
| 11 | + icon: "clerk", |
| 12 | + }, |
| 13 | + { |
| 14 | + title: "A Box account is required.", |
| 15 | + link: "https://account.box.com/login", |
| 16 | + icon: "user-circle", |
| 17 | + } |
| 18 | + ]} |
| 19 | +> |
| 20 | + - Use Box to authenticate users with OAuth |
| 21 | +</TutorialHero> |
7 | 22 |
|
8 |
| -## Overview |
| 23 | +Enabling OAuth with Box allows your users to sign up and sign in to your Clerk app with their Box account. |
9 | 24 |
|
10 |
| -Adding social connection with Box to your app with Clerk is done in a few steps - you only need to set the **Client ID**, **Client Secret** and **Redirect URI** in your instance settings. |
| 25 | +## Configure for your development instance |
11 | 26 |
|
12 |
| -To make the development flow as smooth as possible, Clerk uses preconfigured shared OAuth credentials and redirect URIs for development instances - no other configuration is needed. |
| 27 | +For _development instances_, Clerk uses preconfigured shared OAuth credentials and redirect URIs—no other configuration is needed. |
13 | 28 |
|
14 |
| -For production instances, you will need to generate your own Client ID and Client secret using your Box account. |
| 29 | +1. In the Clerk Dashboard, navigate to the [**SSO connections**](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections) page. |
| 30 | +1. Select **Add connection** and select **For all users**. |
| 31 | +1. In the **Choose provider** dropdown, select **Box**. |
| 32 | +1. Select **Add connection**. |
15 | 33 |
|
16 |
| -> [!NOTE] |
17 |
| -> The purpose of this guide is to help you create a Box developer account and a Box OAuth app - if you're looking for step-by-step instructions using Clerk to add social connection (OAuth) to your application, follow the [Social connection (OAuth) guide](/docs/authentication/social-connections/oauth). |
| 34 | +## Configure for your production instance |
18 | 35 |
|
19 |
| -## Before you start |
| 36 | +For _production instances_, you must provide custom credentials, which involves generating your own **Client ID** and **Client Secret** using your Box account. |
20 | 37 |
|
21 |
| -- You need to create a Clerk application in the [Clerk Dashboard](https://dashboard.clerk.com/). For more information, see the [setup guide](/docs/quickstarts/setup-clerk). |
22 |
| -- You need to have a Box developer account. To create one, [click here](https://developer.box.com/). |
| 38 | +To make the setup process easier, it's recommended to keep two browser tabs open: one for the [Clerk Dashboard](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections) and one for your [Box Developer Console](https://app.box.com/developers/console). |
23 | 39 |
|
24 |
| -## Configuring Box social connection |
| 40 | +<Steps> |
| 41 | + ### Enable Box as a social connection |
25 | 42 |
|
26 |
| -First, you need to create a new OAuth2 Box app. You can find this option in your **Console > Create new app**. Choose **Custom App** and then select **User Authentication (OAuth 2.0)**. |
| 43 | + 1. In the Clerk Dashboard, navigate to the [**SSO connections**](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections) page. |
| 44 | + 1. Select **Add connection** and select **For all users**. |
| 45 | + 1. In the **Choose provider** dropdown, select **Box**. |
| 46 | + 1. Ensure that both **Enable for sign-up and sign-in** and **Use custom credentials** are toggled on. |
| 47 | + 1. Save the **Redirect URI** somewhere secure. Keep this modal and page open. |
27 | 48 |
|
28 |
| -You need to choose an app name and then click **Create application**. |
| 49 | + ### Create a Box app |
29 | 50 |
|
30 |
| - |
| 51 | + 1. On the homepage of the [Box Developer Console](https://app.box.com/developers/console), select **Custom App**. A modal will open. |
| 52 | + 1. Fill out the necessary information. Use Box's [guide on OAuth 2.0 setup](https://developer.box.com/guides/authentication/oauth2/oauth2-setup/#app-creation-steps) to help you. |
| 53 | + 1. Select **Next**. |
| 54 | + 1. In the list of authentication methods, select **User Authentication (OAuth 2.0)**. |
| 55 | + 1. Select **Create App**. You'll be redirected to the app's **Configuration** page. |
| 56 | + 1. In the **OAuth 2.0 Redirect URIs** section, paste the **Redirect URI** value you saved from the Clerk Dashboard. |
| 57 | + 1. In the **OAuth 2.0 Credentials** section, copy the **Client ID** and **Client Secret** somewhere secure. You'll need them to connect your Box app to your Clerk app. |
31 | 58 |
|
32 |
| -In the Clerk Dashboard, navigate to the [**SSO connections**](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections) page. Select the **Add connection** button, and select **For all users**. In the **Choose provider** dropdown, select **Box**. Toggle on **Use custom credentials** and copy **Redirect URIs**. |
| 59 | + ### Set the Client ID and Client Secret in the Clerk Dashboard |
33 | 60 |
|
34 |
| -Copy the **Client ID** and **Client secret** as shown in the above image. Go back to the Clerk Dashboard and paste them into the respective fields. |
| 61 | + 1. Navigate back to the Clerk Dashboard where the modal should still be open. Paste the **Client ID** and **Client Secret** values into the respective fields. |
| 62 | + 1. Select **Add connection**. |
35 | 63 |
|
36 |
| -Don't forget to click **Apply** in the Clerk Dashboard. Congratulations! Social connection with Box is now configured for your instance. |
| 64 | + > [!NOTE] |
| 65 | + > If the modal or page is not still open, navigate to the [**SSO connections**](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections) page in the Clerk Dashboard. Select the **Box** connection. Under **Use custom credentials**, you can paste the **Client ID** and **Client Secret** into their respective fields. |
| 66 | +
|
| 67 | + ### Test your OAuth |
| 68 | + |
| 69 | + The simplest way to test your OAuth is to visit your Clerk app's [Account Portal](/docs/customization/account-portal/overview), which is available for all Clerk apps out-of-the-box. |
| 70 | + |
| 71 | + 1. In the Clerk Dashboard, navigate to the [**Account Portal**](https://dashboard.clerk.com/last-active?path=account-portal) page. |
| 72 | + 1. Next to the **Sign-in** URL, select **Visit**. The URL should resemble: |
| 73 | + |
| 74 | + - **For development** – `https://your-domain.accounts.dev/sign-in` |
| 75 | + - **For production** – `https://accounts.your-domain.com/sign-in` |
| 76 | + |
| 77 | + 1. Sign in with your Box account. |
| 78 | +</Steps> |
0 commit comments