Setup EspoCRM Google OAuth2

  • Okzz
  • Friday, Aug 20, 2021
blog-image

In today’s connected world, one of the most important aspects of digital security is reliable user authentication. Google OAuth2 provides a streamlined method for users to authenticate themselves using their Google account credentials. In this post, we will take you through the process of configuring Google OAuth2 for EspoCRM authentication, allowing users to log in to EspoCRM using their Google account.

Step 1: Setting Up a Google API Project

To get started with Google OAuth2, you first need to create a project in the Google Developer Console.

  1. Open your web browser and navigate to the Google Developer Console.
  2. Sign in using your Google account credentials.
  3. Click on the “Create Project” button to initiate a new project.
  4. Enter relevant details such as the project name, organization, and location, and then click “Create.”

Step 2: Enabling the Google OAuth2 API

Once your project is set up, you’ll need to enable the Google OAuth2 API for it.

  1. Inside the Google Developer Console, navigate to the “Dashboard” tab.
  2. Click on the “Enable APIs and Services” button and enter “Identity Platform” in the search bar.
  3. From the search results, select “Google Identity Platform” and click on “Enable.” This will activate the API for your project.

Step 3: Creating OAuth2 Credentials

After enabling the API, you need to set up OAuth2 credentials for your project.

  1. Inside the Google Developer Console, move to the “Credentials” tab.
  2. Click on “Create credentials” and select “OAuth client ID” from the dropdown menu.
  3. Select “Web application” as the application type.
  4. Provide a name for your application, and in the “Authorized redirect URIs” field, input your EspoCRM instance’s callback URL. The callback URL should be formatted like so: https://your-espo-instance-url/oauth-callback.php.
  5. Click “Create.” You will then receive a Client ID and Client Secret. Be sure to save these values, as they’ll be required in the following steps.

Step 4: Integrating Google OAuth2 with EspoCRM

Now that your OAuth2 credentials are set up on the Google Developer Console, it’s time to configure your EspoCRM to use them.

  1. Log into your EspoCRM instance as an administrator.

  2. Navigate to the “Administration” panel.

  3. Click on “Authentication” within the “Integration” section.

  4. Set “OpenID Connect” as the authentication method.

  5. Fill in the necessary fields using the credentials and details from the previous steps:

    After filling out the form, save your configuration.

Step 5: Configuring User Email Addresses

In order for your users to authenticate using Google OAuth2, their primary email address in EspoCRM must match the email address associated with their Google account.

Conclusion

And that’s it! You’ve successfully configured Google OAuth2 for EspoCRM authentication. Now, when users attempt to log in to EspoCRM, they will be prompted to authenticate using their Google account credentials. This provides a streamlined and secure method for users to access EspoCRM, while also allowing you to manage user access through Google’s identity management tools.

comments powered by Disqus

Latest Posts

DevOps: Lab environment for continuous learning

If you are a DevOps engineer, systems engineer or SRE, it’s invaluable to have a lab environment that gives you free space to explore, build, break, fix, break, refactor, rebuild… and rebuild any part of the infrastructure you wish to work on.

Read more
View All Posts