1.0 KiB
1.0 KiB
Authentik SSO Setup
Create the Authentik application
- In Authentik, create an OAuth2/OpenID Provider.
- Create an Application and link it to that provider.
- Copy the generated client ID and client secret.
Required environment variables
Set these values for the gateway/auth runtime:
AUTHENTIK_CLIENT_ID=your-client-id
AUTHENTIK_CLIENT_SECRET=your-client-secret
AUTHENTIK_ISSUER=https://authentik.example.com
AUTHENTIK_ISSUER should be the Authentik base URL, for example https://authentik.example.com.
Redirect URI
Configure this redirect URI in the Authentik provider/application:
{BETTER_AUTH_URL}/api/auth/callback/authentik
Example:
https://mosaic.example.com/api/auth/callback/authentik
Test the flow
- Start the gateway with
BETTER_AUTH_URLand the Authentik environment variables set. - Open the Mosaic login flow and choose the Authentik provider.
- Complete the Authentik login.
- Confirm the browser returns to Mosaic and a session is created successfully.