|
| 1 | +# How to configure OIDC SSO with Google Workspace |
| 2 | + |
| 3 | +In this guide, we will use Google Workspace as the SSO provider with the OpenID Connect (OIDC) protocol as our preferred identity protocol. |
| 4 | + |
| 5 | +We currently support SP-initiated authentication. User provisioning is part of Enterprise Plus's [Advanced SSO](./enterprise-hub-advanced-sso). |
| 6 | + |
| 7 | +<Tip warning={true}> |
| 8 | + This feature is part of the <a href="https://huggingface.co/enterprise">Team & Enterprise</a> plans. |
| 9 | +</Tip> |
| 10 | + |
| 11 | +### Step 1: Create OIDC App in Google Workspace |
| 12 | + |
| 13 | +- In your Google Cloud console, search and navigate to `Google Auth Platform` > `Clients`. |
| 14 | +- Click `Create Client`. |
| 15 | +- For Application Type select `Web Application`. |
| 16 | +- Provide a name for your application. |
| 17 | +- Retrieve the `Redirection URI` from your Hugging Face organization settings, go to the `SSO` tab and select the `OIDC` protocol. |
| 18 | +- Click `Create`. |
| 19 | +- A pop-up will appear with the `Client ID` and `Client Secret`, copy those and paste them into your Hugging Face organization settings. In the `SSO` tab (make sure `OIDC` is selected) paste the corresponding values for `Client Identifier` and `Client Secret`. |
| 20 | + |
| 21 | +<div class="flex justify-center"> |
| 22 | +<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-google-oidc-create.png"/> |
| 23 | +<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-google-oidc-create-dark.png"/> |
| 24 | +</div> |
| 25 | + |
| 26 | +### Step 2: Configure Hugging Face with Google's OIDC Details |
| 27 | + |
| 28 | +- At this point the **Client ID** and **Client Secret** should be set in your Hugging Face organization settings `SSO` tab. |
| 29 | +- Set the **Issuer URL** to `https://accounts.google.com`. |
| 30 | + |
| 31 | +<div class="flex justify-center"> |
| 32 | +<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-google-oidc-hf-details.png"/> |
| 33 | +<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-google-oidc-hf-details-dark.png"/> |
| 34 | +</div> |
| 35 | + |
| 36 | +### Step 3: Test and Enable SSO |
| 37 | + |
| 38 | +<Tip warning={true}> |
| 39 | +Before testing, ensure you have granted access to the application for the appropriate users. The admin performing the test must have access. |
| 40 | +</Tip> |
| 41 | + |
| 42 | +- Now, in your Hugging Face SSO settings, click on **"Update and Test OIDC configuration"**. |
| 43 | +- You should be redirected to your Google login prompt. Once logged in, you'll be redirected to your organization's settings page. |
| 44 | +- A green check mark near the OIDC selector will confirm that the test was successful. |
| 45 | +- Once the test is successful, you can enable SSO for your organization by clicking the "Enable" button. |
| 46 | +- Once enabled, members of your organization must complete the SSO authentication flow described in |
0 commit comments