Skip to content

triauth for ERPNextOIDC

Let everyone in the company open ERPNext with one approval on their own device, and no ERPNext passwords.

  • Business and ERP
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every ERPNext, as a Frappe Framework feature
Set up in
Integrations › Authentication › Social Login Key

About ERPNext

ERPNext is a business management system that covers accounting, sales, purchasing, stock, manufacturing, projects, and HR in one web application. Companies use it to run their day-to-day operations and reporting instead of separate tools and spreadsheets.

Connect ERPNext to triauth

ERPNext signs people in through the triauth OpenID Connect bridge, added as a custom social login key of the Frappe Framework it runs on. Once connected, the sign-in page shows a button with the name you choose. People click it, type their username, and approve on their own device. Nobody keeps an ERPNext password, and when someone leaves, removing their identity records at your domain ends their access to ERPNext as well.

How it works

  1. Open oidc.triauth.org and enter your domain. Paste the redirect address, https://erp.example.com/api/method/frappe.integrations.oauth2_logins.custom/triauth with your own ERPNext address in place of erp.example.com, and click Connect app. The bridge gives you a client ID and a client secret.

  2. In ERPNext, open Integrations › Authentication › Social Login Key and create a new key. Choose the provider Custom, name it triauth, paste the client ID and the client secret, and fill in the fields below with your domain in place of example.com. Set Sign ups to Allow if new people should get an account at their first sign-in, tick Enable Social Login, and save.

    FieldValue
    Authorize URLhttps://oidc.triauth.org/example.com/authorize
    Access Token URLhttps://oidc.triauth.org/example.com/token
    API Endpointhttps://oidc.triauth.org/example.com/userinfo
    Redirect URLthe redirect address from step 1
    Auth URL Data{"response_type": "code", "scope": "openid email profile"}
  3. Open the sign-in page and click Login with triauth.

Checkpoint

The sign-in page shows a Login with triauth button. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.

Good to know

  • With sign-ups allowed, everyone with an identity at your domain gets a user the first time they sign in. People who already have a user with the same email address sign in to it. To let only one team in, limit the app to a group when you connect it.
  • Roles and permissions in ERPNext are managed in ERPNext. The groups published at your domain are not used.
  • The same key works for every app built on the Frappe Framework, such as the HR or CRM apps on the same site.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-site>/api/method/frappe.integrations.oauth2_logins.custom/<key name>, where the key name is the provider name in lowercase
Where in ERPNextIntegrations › Authentication › Social Login Key, provider Custom
Addressesthe authorization, token, and userinfo addresses go in one by one, as in the table above, since Frappe does not read the discovery document
User ID Propertyleave empty, which means sub
EmailFrappe reads the email address and the name from the userinfo response and requires the email to be verified, which the bridge confirms

Frappe keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. Frappe's Social Login Key guide explains every field.

Next steps

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.