Set up fairlogin ​

fairlogin is an OAuth login provider from fairkom.eu that is aware of the GDPR (the EU General Data Protection Regulation). It runs on Keycloak. After setup, the ERPNext login page offers a fairlogin button.

INFO

Social Login Key is part of the Frappe Framework. The same steps work for other Keycloak servers: select Keycloak as the provider instead of fairlogin.

Prerequisites ​

  • The System Manager role.
  • A client for your ERPNext site in fairlogin. fairkom offers client registration as a service. In Keycloak, the client uses the openid-connect protocol, and the root, redirect, and base URLs are the address of your ERPNext site.
  • The client ID and client secret of that client.

Enable fairlogin ​

  1. Open the Social Login Key list and create a new Social Login Key.

  2. In Social Login Provider, select fairlogin. ERPNext fills in the provider URLs:

    FieldValue
    Base URLhttps://id.fairkom.net/auth/realms/fairlogin/
    Authorize URLhttps://id.fairkom.net/auth/realms/fairlogin/protocol/openid-connect/auth
    Access Token URLhttps://id.fairkom.net/auth/realms/fairlogin/protocol/openid-connect/token
    Redirect URL/api/method/frappe.integrations.oauth2_logins.login_via_fairlogin
    API Endpointhttps://id.fairkom.net/auth/realms/fairlogin/protocol/openid-connect/userinfo
  3. Enter the Client ID and Client Secret.

  4. In Sign ups, select Allow to create an ERPNext user for a new fairlogin account, or Deny to accept only existing users.

  5. Select Enable Social Login, and save.

The login page now shows a fairlogin button.