|
| 1 | +--- |
| 2 | +title: OIDC with VoidAuth |
| 3 | +description: Wire up SSO to VoidAuth |
| 4 | +--- |
| 5 | + |
| 6 | +# OIDC with VoidAuth |
| 7 | + |
| 8 | +[VoidAuth](https://voidauth.app/) is an open-source SSO authentication and user management provider that stands guard in front of your self-hosted application. Before starting, read the [OIDC Setup overview](index.md), as it covers the RomM-side settings common to every provider. |
| 9 | + |
| 10 | +## 1. Prerequisites |
| 11 | + |
| 12 | +VoidAuth installed and running via their [self-hosted deployment docs](https://voidauth.app/#/?id=quick-start). We'll use the `APP_URL` from the example `compose.yml` in those docs as `https://auth.example.com`. |
| 13 | +Your RomM instance will be referenced as `https://demo.romm.app`. |
| 14 | + |
| 15 | +## 2. Create a new app |
| 16 | + |
| 17 | +Log in as an admin in the VoidAuth web interface. Create a new OIDC app (e.g. `RomM`). |
| 18 | + |
| 19 | +- **Name**: `RomM` |
| 20 | +- **Home Page URL**: `https://demo.romm.app` |
| 21 | +- **Logo URL**: `https://docs.romm.app/resources/romm/isotipo.png` |
| 22 | +- **Group**: You could add a group that the user must belong to get access to your RomM instance. If left empty, any user created in your VoidAuth instance will be allowed. |
| 23 | +- **Skip Consent** and **MFA Required**: These options can be enabled or left disabled as you prefer. |
| 24 | +- **Client ID**: Generate an ID using the button. |
| 25 | +- **Auth Method**: `Client Secret Basic` |
| 26 | +- **Client Secret**: Generate a secret using the button. |
| 27 | +- **Redirect URLs**: add `https://demo.romm.app/api/oauth/openid` |
| 28 | +- **Response Types**: check `code` |
| 29 | +- **Grant Types**: check `authorization_code` and `refresh_token` |
| 30 | +- **Post Logout URL**: `https://demo.romm.app/` |
| 31 | + |
| 32 | +Don't forget to click the `Create` button to validate your app. |
| 33 | + |
| 34 | +## 3. Configure |
| 35 | + |
| 36 | +```yaml |
| 37 | +environment: |
| 38 | + - OIDC_ENABLED=true |
| 39 | + - OIDC_PROVIDER=voidauth |
| 40 | + - OIDC_CLIENT_ID=<from VoidAuth> |
| 41 | + - OIDC_CLIENT_SECRET=<from VoidAuth> |
| 42 | + - OIDC_REDIRECT_URI=https://demo.romm.app/api/oauth/openid |
| 43 | + - OIDC_SERVER_APPLICATION_URL=https://auth.example.com |
| 44 | + - OIDC_SERVER_METADATA_URL=https://auth.example.com/oidc/.well-known/openid-configuration |
| 45 | + - ROMM_BASE_URL=https://demo.romm.app |
| 46 | +``` |
| 47 | +
|
| 48 | +VoidAuth's OIDC discovery URL can be found at the top of your OIDC App page, by clicking on OIDC Endpoints. |
| 49 | +
|
| 50 | +For role mapping from VoidAuth, see [OIDC Setup → Role mapping](index.md#role-mapping). |
| 51 | +
|
| 52 | +## 4. Test |
| 53 | +
|
| 54 | +Restart, navigate to `/login` and click the **Login with VoidAuth** button. You're redirected to VoidAuth → authenticate → bounced back and signed in! |
| 55 | + |
| 56 | +If it doesn't work, head to [Authentication Troubleshooting](../../troubleshooting/authentication.md). |
0 commit comments