Connect authentik to Cloudflare Access with OpenID Connect (OIDC). OIDC is the recommended protocol when your identity provider supports both OIDC and SAML.
- An authentik account with administrator access
- A Cloudflare account with Zero Trust access
- A publicly accessible authentik deployment with a trusted TLS certificate
Your Cloudflare Access team name is part of the redirect URI. Locate your team name before you configure authentik.
You can find your team name in the Cloudflare dashboard ↗︎ under Settings > Team name and domain > Team name.
- Log in to authentik as an administrator and open the Admin interface.
- Go to Applications > Applications and select New Application.
- Enter the application details and select Next.
- For the provider type, select OAuth2/OpenID Connect.
- Configure the provider:
-
Enter a provider name.
-
Select an authorization flow.
-
Add a redirect URI with the Strict matching mode and Authorization type:
https://<YOUR_TEAM_NAME>.cloudflareaccess.com/cdn-cgi/access/callback -
Select a signing key. The signing key allows Access to verify tokens through the authentik JSON Web Key Set (JWKS) endpoint.
-
Ensure that the provider includes the
openid,email, andprofilescope mappings.
-
- Record the Client ID, Client Secret, and application slug.
- Select Submit.
For more information about authentik provider settings, refer to OAuth 2.0 provider ↗︎.
-
In Cloudflare Zero Trust, go to Integrations > Identity providers.
Go to Identity providers ↗ -
Select Add new identity provider > OpenID Connect.
-
Enter the following values. Replace
<AUTHENTIK_DOMAIN>with your authentik hostname and<APPLICATION_SLUG>with the application slug from authentik.Field Value Name authentikApp ID The authentik Client ID Client secret The authentik Client Secret Auth URL https://<AUTHENTIK_DOMAIN>/application/o/authorize/Token URL https://<AUTHENTIK_DOMAIN>/application/o/token/Certificate URL https://<AUTHENTIK_DOMAIN>/application/o/<APPLICATION_SLUG>/jwks/ -
Select Save.
The token and certificate endpoints must allow requests from Cloudflare. Interactive challenges or firewall rules on these endpoints can prevent Access from completing authentication.
-
In Cloudflare Zero Trust, go to Integrations > Identity providers.
Go to Identity providers ↗ -
Find the authentik identity provider and select Test.
-
Complete the authentik login flow.
-
Verify that Cloudflare displays a successful test result and the expected email address.