# SSO

{% hint style="info" %}
SSO is only available for Enterprise plan
{% endhint %}

Flowise supports [OIDC](https://openid.net/) that allows users to use *single sign*-on (*SSO*) to access application. Currently only the [Organization Admin](https://docs.flowiseai.com/using-flowise/workspaces#setting-up-admin-account) can configure the SSO configurations.

## Microsoft

1. In the Azure portal, search for Microsoft Entra ID:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-17700181014ec6d78b74aafd5b9053fd3df388c9%2Fimage%20(193).png?alt=media" alt=""><figcaption></figcaption></figure>

2. From the left hand bar, click App Registrations, then New Registration:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-e3dbe87b1292874a2cec64f9a7c19276ecc09504%2Fimage%20(194).png?alt=media" alt=""><figcaption></figcaption></figure>

3. Enter an app name, and select Single Tenant:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-ff22a4be89ab2ba3d6877a1a430e2820ad87ca84%2Fimage%20(195).png?alt=media" alt=""><figcaption></figcaption></figure>

4. After an app is created, note down the Application (client) ID and Directory (tenant) ID:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-c0f67f2e1825dcd986ef03da75300c187258bbaa%2Fimage%20(196).png?alt=media" alt=""><figcaption></figcaption></figure>

5. On the left side bar, click Certificates & secrets -> New client secret -> Add:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-4e861530e80ac4bbbc3b94d1c707934ab4ed78ec%2Fimage%20(198).png?alt=media" alt=""><figcaption></figcaption></figure>

6. After the secret has been created, copy the Value, <mark style="color:red;">not</mark> the Secret ID:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-c1728326e55e800e8d0b1ed911fda9667a137a30%2Fimage%20(199).png?alt=media" alt=""><figcaption></figcaption></figure>

7. On the left side bar, click Authentication -> Add a platform -> Web:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-b04ffcdac2af95d2790a9fe480835892c9346049%2Fimage%20(201).png?alt=media" alt=""><figcaption></figcaption></figure>

8. Fill in the redirect URIs. This will need to be changed depending on how you are hosting it: `http[s]://[your-flowise-instance.com]/api/v1/azure/callback`:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-e1b50c9e32540e047256b397e8e174bec95de122%2Fimage%20(218).png?alt=media" alt="" width="514"><figcaption></figcaption></figure>

9. You should be able to see the new Redirect URI created:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-fd886cce8756ed9cc4a32c4d3fbf2092da82c0ba%2Fimage%20(219).png?alt=media" alt=""><figcaption></figcaption></figure>

10. Back to Flowise app, login as Organization Admin. Navigate to SSO Config from left side bar. Fill in the Azure Tenant ID and Client ID from Step 4, and Client Secret from Step 6. Click Test Configuration to see if the connection can be established successfully:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-b3f5555abf75e80144ae465538f282ae242aa2bc%2Fimage%20(220).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

11. Lastly, enable and save it:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-ebf9e42ac3e33b34deb907b38aaf55e0733f172b%2Fimage%20(221).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

12. Before users can sign in using SSO, they have to be invited first. Refer to [Inviting users for SSO sign in](#inviting-users-for-sso-sign-in) for step by step guide. Invited users must also be part of the Directory Users in Azure.

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-2316cf506d13d12b6a5c4cc5edbcb455f4c03836%2Fimage%20(2)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

## Google

To enable Sign In With Google on your website, you first need to set up your Google API client ID. To do so, complete the following steps:

1. Open the **Credentials** page of the [Google APIs console](https://console.developers.google.com/apis).
2. Click **Create credentials** > **OAuth client ID**

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-8e71bbe4064d9b8e907c302216cc5cda21a6217f%2Fimage%20(224).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

3\. Select **Web Application**:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-ea423fd49d7cba28906ff370555cee06bc562e5d%2Fimage%20(225).png?alt=media" alt="" width="504"><figcaption></figcaption></figure>

4\. Fill in the redirect URIs. This will need to be changed depending on how you are hosting it: `http[s]://[your-flowise-instance.com]/api/v1/google/callback`:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-4ccae983b4ba95bf89d99d6ec3fb680c5f58bc0e%2Fimage%20(226).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

5\. After creating, grab the client ID and secret:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-15e7a5912fd0d644e9e0af098a74e27bb819727f%2Fimage%20(227).png?alt=media" alt=""><figcaption></figcaption></figure>

6\. Back to Flowise app, add the Client ID and secret. Test the connection and Save it.

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-657b4bd8d62efbb5a9d997f8af8874b7de3a7356%2Fimage%20(228).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

## Auth0

1. Register an account on [Auth0](https://auth0.com/), then create a new Application

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-3edebcc007d3db47239d7030455801f82e2cdf1d%2Fimage%20(229).png?alt=media" alt=""><figcaption></figcaption></figure>

2. Select **Regular Web Application**:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-96cc56fe129bf9bd495efba23ba644d532e6a652%2Fimage%20(230).png?alt=media" alt=""><figcaption></figcaption></figure>

3. Configure the fields such as Name, Description. Take notes of the **Domain**, **Client ID**, and **Client Secret**.

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-b056dde9da2968f64553c29943a0c0b3a7166007%2Fimage%20(231).png?alt=media" alt=""><figcaption></figcaption></figure>

4\. Fill in the Application URIs. This will need to be changed depending on how you are hosting it: `http[s]://[your-flowise-instance.com]/api/v1/auth0/callback`:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-0e6572e61c4fe5c35988701ae2e74a9f6235ab4e%2Fimage%20(232).png?alt=media" alt=""><figcaption></figcaption></figure>

5. In the API’s tab, ensure that Auth0 Management API is enabled with the following permissions
   * read:users
   * read:client\_grants

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-d8bf5e63013108d236df4cd5b4d7e38d5306825c%2Fimage%20(233).png?alt=media" alt=""><figcaption></figcaption></figure>

6\. Back to Flowise App, fill in the Domain, Client ID and Secret. Test and Save the configuration.

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-dd43b43c29f1d2571979608e81be7df534646817%2Fimage%20(234).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

## Inviting users for SSO sign in

In order for new user to be able to login, you have to invite new users into Flowise application. This is essential to keep a record of the role/workspace of the invited user. Refer to [Invite Users](https://docs.flowiseai.com/using-flowise/workspaces#invite-user) section for env variables configuration.

Invited user will be receiving invitation link to login:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-dd6b84dd529d7511765d6a10465ca99c4c7105a4%2Fimage%20(222).png?alt=media" alt="" width="449"><figcaption></figcaption></figure>

Clicking the button will bring the invited user directly to Flowise SSO login screen:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-c054a4bb7e8db7dd822702e6385fed4bb8fce406%2Fimage%20(210).png?alt=media" alt="" width="400"><figcaption></figcaption></figure>

Or navigate to Flowise app and Sign in with SSO:

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-f5256bad9b31a88d308ea4260cf906f7440c959d%2Fimage%20(211).png?alt=media" alt="" width="437"><figcaption></figcaption></figure>
