Configure Authentik authentication for your Devana.ai whitemark instance. Authentik is an open-source identity provider that supports OAuth2 and OpenID Connect.
| Variable | Description | Required | Example |
|---|---|---|---|
AUTHENTIK_CLIENT_ID | OAuth2 Client ID from Authentik | Yes | your-client-id |
AUTHENTIK_CLIENT_SECRET | OAuth2 Client Secret from Authentik | Yes | your-client-secret |
AUTHENTIK_CALLBACK_URL | Callback URL for authentication | Yes | https://your-domain.com/auth/authentik/callback |
AUTHENTIK_URL | Base URL of your Authentik instance | Yes | https://auth.yourcompany.com |
AUTHENTIK_USERINFO_URL | UserInfo endpoint URL (optional) | No | https://auth.yourcompany.com/application/o/userinfo/ |
Access Authentik Admin Interface:
Create OAuth2/OpenID Provider:
Devana.ai SSOConfidentialAUTHENTIK_CLIENT_ID)AUTHENTIK_CLIENT_SECRET)openid, profile, email, offline_accessCreate Application:
Devana.aidevana-aiAdd the following variables to your environment configuration:
# Authentik OAuth Configuration
AUTHENTIK_CLIENT_ID=your-client-id
AUTHENTIK_CLIENT_SECRET=your-client-secret
AUTHENTIK_CALLBACK_URL=https://your-domain.com/auth/authentik/callback
AUTHENTIK_URL=https://auth.yourcompany.com
# Optional: Custom UserInfo URL
AUTHENTIK_USERINFO_URL=https://auth.yourcompany.com/application/o/userinfo/
Configure your whitemark to include Authentik as an allowed provider:
{
"allowedProviders": ["AUTHENTIK"],
"registrationType": ["SSO"]
}
The system automatically constructs the following endpoints:
{AUTHENTIK_URL}/application/o/authorize/{AUTHENTIK_URL}/application/o/token/{AUTHENTIK_USERINFO_URL} or {AUTHENTIK_URL}/application/o/userinfo/Authentik provides comprehensive user information through OpenID Connect:
| Authentik Field | Devana.ai Field | Notes |
|---|---|---|
email | email | Primary identifier |
given_name | firstName | First name |
family_name | lastName | Last name |
middle_name | - | Available but not mapped |
preferred_username | - | Available but not mapped |
name | displayName | Full name fallback |
sub | providerId | Unique user identifier |
email_verified | - | Email verification status |
The application requests the following scopes:
openid: Required for OpenID Connectprofile: Access to profile information (name, username)email: Access to email addressoffline_access: Refresh token for long-term accessIf your Authentik instance provides custom scopes, you can request them by modifying the provider configuration. The default scopes are sufficient for most use cases.
Authentik can provide group information through claims. To utilize group-based access control:
Authentik supports custom user attributes that can be included in the OIDC response. Configure these in your Authentik provider settings.
Invalid client credentials:
AUTHENTIK_CLIENT_ID and AUTHENTIK_CLIENT_SECRET are correctRedirect URI mismatch:
Connection refused:
AUTHENTIK_URL is accessible from your application serverInvalid scope:
User profile fetch failed:
AUTHENTIK_USERINFO_URL is correct or remove it to use defaultEnable debug logging to see detailed authentication flow:
DEBUG=authentik:*