Search Results :

×

SSO Intregation between two Drupal sites using OAuth / OpenID Connect protocol

The Drupal OAuth/OIDC Server module enables Single Sign-On i.e. SSO between the Drupal site and any Client application that supports the OAuth or OpenID Connect protocol. Here, we go through the steps to configure the module. In this Integration one Drupal site acts as an Identity Provider and another will act as the client site i.e. users will be logging into the client site using their server site credentials.

  • Download the module:
    composer require 'drupal/oauth_server_sso'
  • Go to Extend menu on your Drupal admin console and enable the module by enabling the checkbox and click on Install button.
  • Configure the module at:
    {BaseURL}/admin/config/people/oauth_server_sso/config_client
  • Install the module:
    drush en oauth_server_sso
  • Clear the cache:
     drush cr
  • Configure the module at:
    {BaseURL}/admin/config/people/oauth_server_sso/config_client
  • Navigate to Extend menu on your Drupal admin console and click on Install new module.
  • Install the Drupal OAuth / OIDC Provider - Single Sign On (SSO) module either by downloading the zip or from the URL of the package (tar/zip).
  • Click on Enable newly added modules.
  • Enable this module by checking the checkbox and click on Install button.
  • Configure the module at
    {BaseURL}/admin/config/people/oauth_server_sso/config_client
  • The miniOrange OAuth Client module will be required on the Client Drupal Site. You can follow the steps mentioned in this setup guide.
  • Once you have installed the miniOrange OAuth client module on the Client site, navigate to the Configuration tab and click on the miniOrange OAuth Client Configuration.
 Drupal as OAuth Client Login - Under Configuration, select miniOrange OAuth Client Configuration

  • From the Select Application dropdown select Custom OAuth 2.0 Provider.
 Drupal as OAuth Client Login - Select Custom OAuth 2.0 Provider from Select Application

  • Enter the application name under the Display Name text field and the name you want to display on the login page link under the Login link on the login page text field.
 Drupal as OAuth Client Login - Enter Display Name

  • Copy the Callback/Redirect URL.
  • Navigate to the Client site and paste the copied Client ID and Client Secret into the respective fields.
 Drupal as OAuth/OpenID Connect Login - Provide the Client ID and Client Secret

  • Add the Endpoints as specified in the table below (You can also get the same from the Scope & Endpoints section of the Drupal site -> Configuration -> miniOrange OAuth server configuration -> OAuth Client):-
  • Scope profile email openid
    Authorize Endpoint {base_url_of_the_drupal_site}/mo/oauth2/authorize
    Access Token Endpoint {base_url_of_the_drupal_site}/mo/oauth2/token
    Get User Info Endpoint {base_url_of_the_drupal_site}/mo/oauth2/userinfo
 Drupal as OAuth/OpenID Connect Login - Provide Scope and Endpoints in ralevant field

  • You can choose where to send the Client ID and Secret from the Header and Body of the request.
  • Make sure the Enable Login with OAuth checkbox is checked and click on the Save Configuration button.
 Drupal as OAuth/OpenID Connect Login - Enabling the checkbox Enable Login with OAuth

  • Click on the Perform Test Configuration button to test the connection.
  •  Drupal as OAuth/OpenID Connect Login - Click on Perform Test Configuration

    • Once the Test is successful you will be navigated to the Attribute Mapping section.
    • From the Email Attribute dropdown select the attribute in which you have received the user’s email. Similarly for Username Attribute.
    • Once done with the Attribute Mapping, click on the Save Configuration button.
    Drupal as OAuth/OpenID Connect Login - Select Email Attribute, click on Save Configuration button

    Let’s see how it works:

    • Open a new window/private browser and navigate to the login page of the Client Site.
    • Click on the Login with Drupal button.
    • Test SSO Connection between the Drupal sites - Click on Login with Drupal
    • Enter the Server site credentials and click on the Log in button.
    • Enter the Drupal OAuth Client credentials

    You have successfully performed the SSO between 2 Drupal sites!

    If you face any issues during the configuration or if you want some additional features, please contact us at drupalsupport@xecurify.com.

    ADFS_sso ×
    Hello there!

    Need Help? We are right here!

    support
    Contact miniOrange Support
    success

    Thanks for your inquiry.

    If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com