# Auth0

A flexible, drop-in solution to add authentication and authorisation services to your applications. Auth0 is often categorised as Identity-as-a-Service (IDaaS) and is a cloud-based solution. It offers a range of services, including but not limited to, single sign-on, multi-factor authentication, password-less login, and user management. Benefits of Auth0:&#x20;

1. **Platform Agnostic**: Unlike ADFS, Auth0 is not tied to any specific operating system or suite of tools. This makes it highly versatile and suitable for a wider range of applications.
2. **Cloud-Based**: As a cloud-based service, it's easier to scale and has lower upfront costs compared to a self-hosted solution like ADFS.
3. **Feature-Rich**: Auth0 offers a host of features, including social login options, multi-factor authentication, and breach detection.

You'll need to create an Auth0 account before you can set up SSO on your Synap platform, head over to <https://auth0.com/> to learn more and get started for free.

{% hint style="info" %}
US Infrastructure is a Synap Enterprise only feature, please note if you are based in the US you are **not** automatically moved to US infrastructure and will need to use EU links in your set up.&#x20;
{% endhint %}

```
EU Infrastructure Callback URL:
https://api.synap.ac/external-auth/auth0/authenticate
```

```
US Infrastructure Callback URL:
https://use1.prod.api.synap.ac/external-auth/auth0/authenticate
```

### 1. Create an application in Auth0

Follow the steps in Auth0's [documentation](https://auth0.com/docs/customize/extensions/single-sign-on-dashboard-extension/create-sso-dashboard-application) to create an application. You'll need to go to applications, create application. Make sure you create a Regular Web Application.

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FvY5D3FqVIRqex0m93JU3%2FScreenshot%202023-07-20%20at%2014.23.01.png?alt=media&#x26;token=6e8e8165-9a62-4172-b208-baf480299190" alt=""><figcaption><p>Auth0 Applications page</p></figcaption></figure>

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FUW7eckbzDZZl77t7DdCJ%2FScreenshot%202023-07-20%20at%2014.23.41.png?alt=media&#x26;token=1f7851e7-45ee-4d5a-a804-861ea924b5aa" alt=""><figcaption><p>Select Regular Web Application in Auth0</p></figcaption></figure>

When you create the application, there is an option to give more details but you can ignore this and go to settings to get the information you need to put back into Synap.&#x20;

From the Settings>Authentication page, add a new connection, select Auth0 as the authentication method.  Give the configuration the appropriate label (what your users will see on the button on the login page) and a name. &#x20;

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FhTTIkcZ3GfmXhyR7jfaN%2FScreenshot%202023-07-20%20at%2014.24.48.png?alt=media&#x26;token=6fc840e5-8662-4e95-86a6-8ed97f962a6e" alt=""><figcaption><p>Synap adding a new SSO configuration </p></figcaption></figure>

You will now need to go back to your application on Auth0 and get the following information:&#x20;

* Domain&#x20;
* Client ID
* Client secret

Copy each of these and put them back into Synap and save.

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FnuAnNiG3ORaH2sl90V7Q%2FScreenshot%202023-08-02%20at%2014.20.00.png?alt=media&#x26;token=5aeb8b3d-f141-4158-8657-36336f025dcc" alt=""><figcaption><p>Copy over the details from Auth0 to Synap</p></figcaption></figure>

From the Auth0 settings page for your application you can also upload a logo and add in the different connections you want to use, once done save your changes. Now open your connection on Synap, you need to get the **Callback URL** to put into Auth0 in the **Settings>Application URIs>Allowed Callback URLs** and save

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FQnsFmDjqHk5NlbuDSRI1%2FUntitled_%20Aug%202%2C%202023%202_32%20PM.gif?alt=media&#x26;token=e6a67736-e93d-447b-a229-383c7217d8a1" alt=""><figcaption><p>Getting the callback URL into Auth0</p></figcaption></figure>

Once all this is done you can save and enable the connection on Synap.&#x20;

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FpsfYargXKcNlJ7a9uyDe%2Fenablesso.gif?alt=media&#x26;token=b11c2a47-5605-4c75-b105-616e97782fe5" alt=""><figcaption><p>enabling an Auth0 connection</p></figcaption></figure>

You may need to setup your admin account as a user on Auth0 if you're going to disable local login. Using the main menu, navigate to users and create a user with the same email you use to login to Synap with. [More in Auth0 docs](https://auth0.com/docs/manage-users/user-accounts/create-users)

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FGzHfShGBShNtKC3ymOw0%2FScreenshot%202023-08-02%20at%2014.26.41.png?alt=media&#x26;token=44944bad-5173-4f6d-a71b-f34b6fb1ca31" alt=""><figcaption><p>Creating a user in Auth0</p></figcaption></figure>

From here you SSO is ready to go, in Auth0 you can select from predefined connections and enable them right away (Google, Facebook, Microsoft) or add in your own custom one.

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FJ1tclXHupd6OXhTtIvZc%2FScreenshot%202023-07-20%20at%2014.34.17.png?alt=media&#x26;token=14f8360e-8b9f-43ce-9cce-0298fa910dc9" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.synap.ac/doc/portal-settings/portal-settings/sso-authentication/auth0.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
