# Webchat SSO-SAML and OAuth2-SSO Integration with Auth0

This topic discusses two ways that you can set up SSO options via the Auth0 application.

## In the Auth0 Dashboard:

1\. Login to Auth0 dashboard <https://manage.auth0.com/dashboard/>

2\. Navigate to **Dashboard > Applications > Applications**.

3\. Click on  **+ Create Application**.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfD6HVus_9fbIPjmr-d0QA8qbiFspTQsB9Vix6SDWs5esOWdt6eDJ-riUG0aaQ-zsIi-gnEqq0UnZDGfb4HE6BY6Tl-PN5YrsV3_Q5i-2P6yDsSC99mfVJGYx6DqUCcc90v9ESvBf1iIRR-vHajC6IdY3An_5313UeogBve3pqrNGRKJ0Dx?key=7iL2ZOh7YBQmH-tJCPo89Q" alt=""><figcaption><p>Creating Auth0 Applications</p></figcaption></figure>

### Choose one of the following two SSO options for Webchat:

* [**SSO-SAML (Auth0)**](#to-set-up-ssl-saml-auth0)
* [**OAuth2 - SSO (Auth0)**](#to-set-up-sso-oauth2-auth0)

### To set up SSL-SAML (Auth0)

1. Set your apps Name and Select “Regular Web Applications”

<div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfpGyu2ZxQKwXEK5lPejwidROi0hd7pKyvTnRpjlCaBDkhmwDYeTRCIKmL0aURuZpGePOqq6G_xSmVEVq4pv7mkeUPTxgxEq1VOKLGQtz5dPutu2KT3U-aYQQgNDckjTwjlkGM8KMJrfzSwt3C0UEP5b-KNdNeJcotblDJ95jBGIBSTchfbrA?key=7iL2ZOh7YBQmH-tJCPo89Q" alt="" width="563"><figcaption></figcaption></figure></div>

4\. Go directly to the Settings tab

<div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfliiZXkPz_HvDOhDA23J1SHFiCaKucTd1rpDXSToJMlrFhWve9kbFtjulAETEDIEsoSccz5YX_NBPfMNOOHOLqj0n64trQ5L9aIu3-SbvryrNgq19tVKOSE8oDgSHFEfkFYDOdxQoXrae0lfjkv8lxvG0dK80j8CvsDMMQzHEDWOfsa0QCvg?key=7iL2ZOh7YBQmH-tJCPo89Q" alt=""><figcaption></figcaption></figure></div>

5\. Go to section “Application URIs” and set the required value in Allowed Callback URLs

Callback URLs need to be in the syntax: `{vanityUrl}/aisera/ssoLoginCallback,`

such as: `https://acme.chatbot.aisera.cloud/aisera/ssoLoginCallback`

<div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcy0Fhxe0SWCnVXbM23R0D-DDzfonXh-sPcXczgYzOuQpfCpt_3N4siR_OkVvsmq2l0xjjmq9pG3p9NocZcdVG9_QcVIrAq2mZfirq6-HS-f4nR2tF9ypP9n4aAOua3dUzBTOfia3Mc45WHpVs_VHfgeT5RDGE6JNzBLXJ3swWx15ldfZA63Uk?key=7iL2ZOh7YBQmH-tJCPo89Q" alt="" width="563"><figcaption></figcaption></figure></div>

6\. Scroll to “Advanced Settings” and select the tab “Endpoints”

<div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcq8Q2hd81454LVbtH_BVwjG8PkmPWtDusuGSIej0YJZtROZTYQfuVJlUTSGHQyl7CWcXR-udY2IDtVAdfSeXlVGUA70WN_nsf_QK9-OFl4d_J-fId_NNvCEVqCMnatzSpCXfApUlMcMnxEYRz3YAxHv1q6DWcC2SWFZdG3vjK8-4ky0OkiqQ?key=7iL2ZOh7YBQmH-tJCPo89Q" alt=""><figcaption></figcaption></figure></div>

7\. Copy the SAML Protocol URL

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfQMDOfHqxZAcK6cdYBldT7x_AvmphfYqGYij6oz8In6SXspfMQqjWqwK9f-fsPZNg9rgh1YyHci1VkoYmhqpjnZdoe4eTmK0adXCOIMR084iY4nYmby_uatO8SpY5VPbbcP_pSsPfzD_28KZKJkiuQeCUE31jkQ0oHtOwWA1neRrqCL8Xi1Q?key=7iL2ZOh7YBQmH-tJCPo89Q" alt=""><figcaption></figcaption></figure>

8\. Move to the “Certificates” tab and copy the “Signing Certificate”

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfmMyCFvp0Mx13r-JMYZX508sQknOVARsvKKNrmUQ10zGeeroeG4MCKy_BNCJ9Swso7QiVAxpxGuOLDxYyotTlDjk5W6VLsSvo2iGoRFFb_xd-RvfWaiheJx8US6TFqL58Pp7MxCmVScMa5e0vNj6ArB-0JAdXJx3Nkyr_ka2i11XyNtGsIVgM?key=7iL2ZOh7YBQmH-tJCPo89Q" alt=""><figcaption></figcaption></figure>

## Setting up SSO for a channel in Admin Console

1. Open Aisera Admin UI and go to  **Settings > Channels > New Channel** to set up a new Webchat channel
2. Under the **Authentication** tab, select **SSO** and provide:\
   \
   **Login URL:** SAML Protocol URL\
   **ACS URL:** The identity provider's SSO URL used by Aisera to authenticate.\
   **Issuer:** The Aisera Entity ID. If none specified, it is generated based on the cluster as 'aisera-saml-{clusterType}'. (such as, aisera-saml-staging or aisera-saml-prod)\
   **IFrame embedding:** If checked then the SSO authentication form is displayed in the same window instead of opening a separate one. You may need to configure the identity provider to allow iframe embedding for this to work.\
   **Skip compression:** If checked, the SAML request from Aisera will not be compressed.\
   **x509 Certificate:** Signing Certificate

## Finish the channel setup and add the channel to an Aisera App

1. Select **Settings > Channels**, and choose your Webchat channel.
2. Choose the **pencil icon** to open the **Edit Channel** window.

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FKiX2fdqiusP6jUNpQOIK%2FSSO_new.png?alt=media&#x26;token=0357c253-17be-48c8-b0e0-f78180a1cf88" alt=""><figcaption><p>Webchat Details Window</p></figcaption></figure>

3\. Fill in the remaining values for the SSO section and click **OK**.

### To set up SSO-OAuth2 (Auth0)

1. Set your apps **Name** and Select **Single Page Applications.**

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FTEqSLk1fFf3WIv4MrDX6%2Fauth1.png?alt=media&#x26;token=428547b1-bfa5-474a-b52c-eed7ffccd6e6" alt="" width="563"><figcaption><p>Auth0 Application Types</p></figcaption></figure></div>

2. Go to the **Settings** tab<br>

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FZlNIYCbqB0iivSfmS3Wm%2Fauth2.png?alt=media&#x26;token=6e8e1f93-9d9d-4645-801e-fc9ba87a9a2c" alt="" width="563"><figcaption></figcaption></figure></div>

3. Go to section “**Application URIs**” and set the <`vanityUrl>` as value in **Allowed Callback URLs.**\
   Need to be in the form of\
   such as, `https://acme.chatbot.aisera.cloud/`

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FjwzUSvxtaR7rRSWJUC7e%2Fauth3.png?alt=media&#x26;token=d7d86f32-59cd-45cf-8bd6-097c123f0e37" alt="" width="563"><figcaption></figcaption></figure></div>

4. In **Cross-Origin Authentication** enable **Allow Cross-Origin Authentication** and set the vanity URL as value in **Allowed Origins (CORS)**

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F4HTK2lN6NTtUCRVdzgvA%2Fauth4.png?alt=media&#x26;token=6f2dd930-e96b-47c3-99b0-74265d124618" alt=""><figcaption><p>Allow Cross-Origin Communication</p></figcaption></figure>

5. **IMPORTANT!**: In order to allow Cross-Origin Authentication the **Universal Login Experience** needs to be set to “**Classic**”.
6. Go to **Branding > Universal Login Settings** and select **Classic**.

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FswGCSk4PR8EUdNfef3Ng%2Fauth5.png?alt=media&#x26;token=52a9cfff-3e0b-427c-a8ff-6da1c6b83bbb" alt=""><figcaption><p>Universal Login</p></figcaption></figure>

7. Open Aisera Admin UI and go to **Settings** > **Channels** > **New Channel** to setup a new webchat channel.
8. In Authentication select **SSO-Auht0** and provide
   * **Domain**: Copy from **Auth0 > App > Settings**
   * **Client ID**: Copy from **Auth0 > App > Settings**

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2Fi8GnJIJEXEpfJaMd9ziH%2Fauth6.png?alt=media&#x26;token=e7d11f30-4599-4798-97ec-83b07686d963" alt=""><figcaption><p>OAuth2-SSO Option</p></figcaption></figure>

7. Finish the channel setup and add the channel to an Aisera App
