triauth for ERPNextOIDC
Let everyone in the company open ERPNext with one approval on their own device, and no ERPNext passwords.
- 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
Open oidc.triauth.org and enter your domain. Paste the redirect address,
https://erp.example.com/api/method/frappe.integrations.oauth2_logins.custom/triauthwith your own ERPNext address in place oferp.example.com, and click Connect app. The bridge gives you a client ID and a client secret.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 ofexample.com. Set Sign ups to Allow if new people should get an account at their first sign-in, tick Enable Social Login, and save.Field Value Authorize URL https://oidc.triauth.org/example.com/authorizeAccess Token URL https://oidc.triauth.org/example.com/tokenAPI Endpoint https://oidc.triauth.org/example.com/userinfoRedirect URL the redirect address from step 1 Auth URL Data {"response_type": "code", "scope": "openid email profile"}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
| Setting | Value |
|---|---|
| Redirect address | https://<your-site>/api/method/frappe.integrations.oauth2_logins.custom/<key name>, where the key name is the provider name in lowercase |
| Where in ERPNext | Integrations › Authentication › Social Login Key, provider Custom |
| Addresses | the 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 Property | leave empty, which means sub |
| Frappe 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
- Read the OpenID Connect bridge page for what every connected app gets and what the bridge keeps private.
- Read Roll out to your team to give everyone in your organization an identifier at your domain.
- Read Groups to limit ERPNext to one team when you connect it.
- Read Frappe's Social Login Key guide for every setting it offers.
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.