Search Results :

×

Google Drupal SSO Login integration using OAuth / OpenID connect

Google Drupal OAuth / OpenID Connect integration enables SSO between the Drupal site and Google. This setup guide helps in configuring Single Sign-On (SSO) between the Drupal site and Google using the OAuth/OpenID Connect module. This module is compatible with Drupal 7, Drupal 8, Drupal 9, Drupal 10, and Drupal 11. When you incorporate the OAuth / OpenID Connect module with the Drupal site, you can log into the Drupal site seamlessly with the Google credentials.

Configure Drupal as an OAuth Client

Google Apps SSO Select Project

  • On the Select a project popup, click on the New project button to create a new project or choose one of the current ones to continue.
Google Apps SSO Create a New Project

  • In the New Project panel, enter the following information:
    • Enter the name of your project into the Project name text field.
    • Click on Create button to create the project.
Google Apps SSO Project Name Field

  • After creating the project, click on APIs & Services from the dashboard.
Google Apps SSO click APIs and Services

  • Now, select the project which you created.
Google Apps SSO Select projec

  • From the left navigation panel, click on Credentials.
  • Then, click on the Create credentials.
Google Apps SSO Select APIs and Services then credentials

  • From the drop-down, select OAuth client ID option.
Google Apps SSO - Click on Create Credentials button

  • If you get a warning that says, To create an OAuth Client ID, you must first set a product name on the consent screen (as shown in the image below), ignore it. Click on the Configure consent screen button.
Google Apps SSO - Click on the CONFIGURE CONSENT SCREEN

  • You will be redirected to the Branding window, click on the Get started button.
Google Apps SSO - barnding-get-started

  • Enter the following information in the Project configuration window:
    • In the App name text field, enter the name of the application.
    • Enter your email address in the User support email text field so that people can contact you with queries concerning their consent.
    • In the Audience select External checkbox.
    • In the Contact Information enter your contact email.
    • Finish your configuration. and click on the Create button.
Google Apps SSO - project Configuration
  • Next, click on the Create OAuth client button.
Google Apps SSO - create OAuth Client
  • Select Application type as Web application.
Google Apps SSO - select web application
  • Enter the following information in the Create OAuth client ID window:
    • Name: Enter the Name of your OAuth 2.0 client. (This name is just used to identify the client in the console.)
    • Authorised redirect URIs: Click the + Add URI button and paste the previously copied Callback/Redirect URL from Drupal into the text field.
    • Then, click on Create button.
Google Apps SSO - In the Create OAuth client ID window, enter required information

  • From the popup copy the Client ID and Client Secret. Keep it handy. It will require to configure Drupal as OAuth client.
Google Apps SSO - Drupal-Auth-SSO-Google-Apps-Copy-Client-ID-Seceret

  • Go to miniOrange OAuth Client module.
  • In Drupal’s Configure OAuth tab paste the copied Client ID and Client Secret from Google in the Client ID and Client Secret text fields.
Drupal OAuth/OoenId connect- paste the copied Client ID and Client Secret

  • Confirm the Scope and Endpoints from the table below and click on the Save Configuration button.
  • Scope email+profile
    Authorize EndPoint https://accounts.google.com/o/oauth2/auth
    Access Token Endpoint https://www.googleapis.com/oauth2/v4/token
    Get User Info Endpoint https://www.googleapis.com/oauth2/v1/userinfo


Integrating Drupal with Google:

  • Go to miniOrange OAuth Client module.
  • In Add tab, paste the copied Client ID and Client Secret from Google in the Client ID and Client Secret text-field.
Drupal-Auth-SSO-Google-Paste-Client-Credentials

  • Confirm the Scope and Endpoints from the table below and click on the Save Configuration button.
  • Scope email+profile
    Authorize EndPoint https://accounts.google.com/o/oauth2/auth
    Access Token Endpoint https://www.googleapis.com/oauth2/v4/token
    Get User Info Endpoint https://www.googleapis.com/oauth2/v1/userinfo


  • The Send Client-ID and Secret in checkbox allows you to specify whether the Client ID and Secret should be included in the header or the body of the Token Endpoint Request. If you're unsure which option to select, you can stick with the default settings.
  • Click on the checkbox to Enable Login with OAuth, scroll down, and click the Save Configuration button.
Drupal OAuth OpenID OIDC Single Sign On (SSO) Enabling the Login with OAuth checkbox and click Save Configuration

Test Connection between Drupal and OAuth Provider



ADFS_sso ×
Hello there!

Need Help? We are right here!

support