Directus SSO with Authentik (OIDC)

Enable the Directus openid driver on a licensed self-hosted deployment with a restricted registration role.

Last updated

On this page (5)

Directus · Authentik · OIDC

Before you start

  • Self-hosted Directus Team or Enterprise license or Open Innovation Grant.
  • Directus deployment admin, authentik admin and a least-privilege Directus role ID.

Configure sign-in

  1. Create an authentik OAuth2/OpenID Connect provider with a signing key and strict redirect https://<directus>/auth/login/authentik/callback. Bind the application to eligible users or groups before allowing registration.
  2. Set PUBLIC_URL to the Directus HTTPS URL, add authentik to AUTH_PROVIDERS and set AUTH_AUTHENTIK_DRIVER=openid. Set AUTH_AUTHENTIK_CLIENT_ID and AUTH_AUTHENTIK_CLIENT_SECRET and use https://<authentik>/application/o/<slug>/.well-known/openid-configuration for AUTH_AUTHENTIK_ISSUER_URL.
  3. For the documented automatic registration flow set AUTH_AUTHENTIK_ALLOW_PUBLIC_REGISTRATION=true and AUTH_AUTHENTIK_DEFAULT_ROLE_ID to the restricted role ID. Restart Directus.

Verify the result

  • Confirm an allowed user can Log in with authentik and receives only the intended role.
  • Confirm an unbound user cannot self-register through the IdP, and existing providers remain configured.

Official documentation

Have Pilae connect your identity provider

Pilae can deploy Directus with your identity provider already connected. We agree the edition, account mapping and access tests with your team before rollout.