Integrate with Frappe/ERPNext
Support level: Community
What is Frappe?
Frappe is a full stack, batteries-included, web framework written in Python and JavaScript.
Preparation
The following placeholders are used in this guide:
frappe.companyis the FQDN of the Frappe installation.authentik.companyis the FQDN of the authentik installation.
These instructions apply to Frappe Framework apps that use Social Login Key, including ERPNext.
This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application.
authentik configuration
In authentik versions earlier than 2026.5, all Redirect URIs are automatically treated as Authorization type. If you are using one of these older authentik versions, add only the Authorization URL to your Redirect URIs and do not configure a Post Logout URI.
To support the integration of Frappe with authentik, you need to create an application/provider pair in authentik.
Create an application and provider
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Applications > Applications and click New Application to open the application wizard.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings.
- Choose a Provider type: select OAuth2/OpenID Connect as the provider type.
- Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
- Note the Client ID and Client Secret values because they will be required later.
- Add a Redirect URI of type
StrictAuthorizationashttps://frappe.company/api/method/frappe.integrations.oauth2_logins.custom/authentik. - Select any available signing key.
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
-
Click Submit to save the new application and provider.
Frappe configuration
-
Log in to Frappe as an administrator.
-
From the Frappe main menu, navigate to Integrations and select Social Login Key.
-
Click + New.
-
Configure the following settings:
- Client Credentials
- Enable Social Login: enable this option.
- Provider Name:
authentik. - Client ID: Client ID from authentik.
- Client Secret: Client Secret from authentik.
- Configuration
- Sign ups:
Allow.
- Sign ups:
- Identity Details
- Base URL:
https://authentik.company
- Base URL:
- Client URLs
- Authorize URL:
/application/o/authorize/ - Access Token URL:
/application/o/token/ - Redirect URL:
/api/method/frappe.integrations.oauth2_logins.custom/authentik - API Endpoint:
/application/o/userinfo/
- Authorize URL:
- Client Information
-
Auth URL Data:
{"response_type": "code","scope": "openid email profile"}
-
- Client Credentials
-
Click Save.
Configuration verification
To confirm that authentik is properly configured with Frappe, log out of Frappe and click the login button for your configured provider. A successful login should redirect you to authentik and return you to Frappe after authentication.