OAuth2 user authentication

These instructions are for the Private eazyBI version 4.0.1 or later.

You can enable Private eazyBI user authentication using an external OAuth 2.0 authentication provider. Currently, Private eazyBI by default supports OAuth2 user authentication with Google and Salesforce but it is possible to add additional custom OAuth2 authentication providers.

Authentication with Google

  • Create a project (or use existing project) at https://console.developers.google.com.
  • In Credentials section create a new Client ID for web application and in Authorized Redirect URI enter BASE_URL/eazybi/users/auth/google/callback (substitute BASE_URL with http://localhost:8080 in development or with the corresponding URL in production).
  • In eazybi.toml specify Client ID and Client secret that were created by Google:
[authentication.google]
omniauth = "oauth2"
client_id = "..."
client_secret = "..."

Restart the application after adding the authentication information in eazybi.toml. After that in Sign up and Log in pages you should see an option to authenticate with Google.

Authentication with Salesforce

See the Salesforce OAuth 2.0 tutorial page for more details Salesforce and OAuth2 integration.

  • From Salesforce Administer / Manage Apps / Connected Apps create a new connected application.
  • Enable OAuth Settings and specify Callback URL BASE_URL/eazybi/users/auth/google/callback (substitute BASE_URL with localhost:8080 in development or with the corresponding URL in production).
  • From the scopes select and add Access your basic information.
  • In eazybi.toml specify client_id (Consumer Key) and client_secret (Consumer secret) that were created by Salesforce:
[authentication.salesforce]
omniauth = "oauth2"
client_id = "..."
client_secret = "..."

Restart the application after adding the authentication information in eazybi.toml. After that in Sign up and Log in pages you should see an option to authenticate with Salesforce.