|
| 1 | +--- |
| 2 | +title: Auth0 |
| 3 | +description: Configure SSO with Auth0 (OIDC or SAML) |
| 4 | +--- |
| 5 | + |
| 6 | +<Tabs items={['SSO (OIDC)', 'SAML']}> |
| 7 | +<Tab value="SSO (OIDC)"> |
| 8 | + |
| 9 | +## 1. Create an application in Auth0 |
| 10 | + |
| 11 | +1. Log in to the [Auth0 Dashboard](https://manage.auth0.com/). |
| 12 | +2. Go to **Applications** → **Applications** → **Create Application**. |
| 13 | +3. Choose **Regular Web Application** and create it. |
| 14 | +4. Note your **Domain**, **Client ID**, and **Client Secret**. |
| 15 | + |
| 16 | +## 2. Configure Dokploy |
| 17 | + |
| 18 | +1. In Dokploy, go to **Settings** (or **Organization** / **Security** in Enterprise). |
| 19 | +2. Enable **SSO** and choose **OpenID Connect**. |
| 20 | +3. Enter: |
| 21 | + - **Provider**: myorg-name-auth0 (Unique) |
| 22 | + - **Issuer URL**: `https://YOUR_AUTH0_DOMAIN/` (Make sure add the trailing slash) |
| 23 | + - **Domain**: the domain users use to authenticate via Auth0 (e.g. your organization domain like `acme.com`), not the Dokploy instance URL |
| 24 | + - **Client ID**: from Auth0 application |
| 25 | + - **Client Secret**: from Auth0 application |
| 26 | + - **Scopes**: openid email profile |
| 27 | +4. Save. |
| 28 | + |
| 29 | +## 3. Configure Auth0 |
| 30 | + |
| 31 | +1. In your application, go to **Settings**. |
| 32 | +2. Set **Allowed Callback URLs** to your Dokploy URL, for example: |
| 33 | + - `https://your-dokploy-domain.com/api/auth/callback/myorg-name-auth0` |
| 34 | +3. Set **Allowed Logout URLs** to: |
| 35 | + - `https://your-dokploy-domain.com` |
| 36 | +4. Set **Allowed Origins** to: |
| 37 | + - `https://your-dokploy-domain.com` |
| 38 | +5. Save changes. |
| 39 | + |
| 40 | +## Troubleshooting (OIDC) |
| 41 | + |
| 42 | +- **Redirect URI mismatch** — Ensure the callback URL in Dokploy matches exactly what is configured in Auth0 (including protocol and path). |
| 43 | +- **Invalid client** — Double-check Client ID and Client Secret, and that the application is a web application. |
| 44 | +- **Scopes** — Ensure Auth0 is configured to return `openid` and, if required, `email` and `profile`. |
| 45 | + |
| 46 | +</Tab> |
| 47 | +<Tab value="SAML"> |
| 48 | + |
| 49 | +## 1. Create a SAML application in Auth0 |
| 50 | + |
| 51 | +1. Log in to the [Auth0 Dashboard](https://manage.auth0.com/). |
| 52 | +2. Go to **Applications** → **Applications** → **Create Application**. |
| 53 | +3. Choose **Regular Web Application** and create it. |
| 54 | +4. In the application, go to **Add Ons** → enable **SAML 2 Web App** and configure it, in the settings specify this callback URL: `https://your-dokploy-domain.com/api/auth/sso/saml2/callback/myorg-name-auth0-saml`. |
| 55 | +5. Next & Save. |
| 56 | + |
| 57 | +## 2. Configure Dokploy |
| 58 | + |
| 59 | +1. In Dokploy, go to **Settings** (or **Organization** / **Security** in Enterprise). |
| 60 | +2. Enable **SSO** and choose **SAML**. |
| 61 | +3. Enter: |
| 62 | + - **Provider**: myorg-name-auth0-saml (unique name for this provider) |
| 63 | + - **Issuer URL**: the Auth0 SAML Entity ID / Issuer located in `Add Ons` tab called `SAML 2 Web App` called `Entity ID` (e.g. `urn:auth0:your-tenant:your-app`) |
| 64 | + - **SSO URL**: the Auth0 SAML Single Sign-On URL located in `Add Ons` tab called `SAML 2 Web App` called `Single Sign-On URL` (e.g. `https://dev-ladsadb.us.auth0.com/samlp/wgJe9bWmwhVnuAC7eNtyUsiou4b6wxuf`) |
| 65 | + - **Certificate**: download the certificate active (x509) from the `Add Ons` tab called `SAML 2 Web App` called `Identity Provider Certificate` and paste it in the `Certificate` field. |
| 66 | + - **Federation Metadata XML**: copy the Identity Provider Metadata XML from the certificate active and paste it in the `Metadata XML` field. |
| 67 | + - **Domain**: the domain users use to authenticate via Auth0 (e.g. your organization domain like `acme.com`), not the Dokploy instance URL |
| 68 | +4. Save. |
| 69 | + |
| 70 | +## 3. Configure Auth0 (SAML) |
| 71 | + |
| 72 | +1. In your Auth0 SAML application, set the **Application Callback URL** (ACS URL) to your Dokploy SAML ACS URL, for example: |
| 73 | + - `https://your-dokploy-domain.com/api/auth/sso/saml2/callback/myorg-name-auth0-saml` |
| 74 | +2. In the **SAML 2 Web App** add-on, open **Settings** and paste the following JSON in the **Settings** (Application Settings) field. Replace `https://your-dokploy-domain.com` with your Dokploy base URL and `myorg-name-auth0-saml` with the **exact same provider name** you entered in Dokploy in step 2 (the callback URL path must match), so Dokploy can read email, display name, and other attributes: |
| 75 | + |
| 76 | +```json |
| 77 | +{ |
| 78 | + "audience": "https://your-dokploy-domain.com/saml/metadata", |
| 79 | + "recipient": "https://your-dokploy-domain.com/api/auth/sso/saml2/callback/myorg-name-auth0-saml", |
| 80 | + "destination": "https://your-dokploy-domain.com/api/auth/sso/saml2/callback/myorg-name-auth0-saml", |
| 81 | + "signResponse": true, |
| 82 | + "signAssertion": true, |
| 83 | + "nameIdentifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", |
| 84 | + "nameIdentifierProbes": [ |
| 85 | + "email" |
| 86 | + ], |
| 87 | + "mappings": { |
| 88 | + "email": "email", |
| 89 | + "displayName": "name", |
| 90 | + "givenName": "given_name", |
| 91 | + "surname": "family_name" |
| 92 | + } |
| 93 | +} |
| 94 | +``` |
| 95 | + |
| 96 | +4. Save. |
| 97 | + |
| 98 | +## Troubleshooting (SAML) |
| 99 | + |
| 100 | +- **ACS URL mismatch** — Ensure the callback/ACS URL in Auth0 matches exactly what Dokploy provides (including protocol and path). |
| 101 | +- **Certificate** — Use the full x509 certificate from Auth0 (PEM format); ensure no extra spaces or line breaks. |
| 102 | +- **Entity ID** — The Entity ID in Dokploy must match the Issuer/Entity ID configured in Auth0. |
| 103 | + |
| 104 | +</Tab> |
| 105 | +</Tabs> |
| 106 | + |
| 107 | +For help with your setup, [contact us](https://dokploy.com/contact). |
0 commit comments