Search Results :

×

WordPress Drupal Single Sign-On – SSO Integration using OpenID Connect protocol


Drupal SSO integration will allow the users to log in to the WordPress using the Drupal site Credentials. This SSO integration is achieved by the miniOrange OAuth / OpenID Connect server module which uses the OAuth 2.0 and OpenID Connect protocol. The module is compatible with all OAuth / OpenID Connect clients and is available for Drupal 7, Drupal 8, Drupal 9, and Drupal 10.

In this setup guide, we will help you configure the Single Sign-on login using the OAuth protocol between the Drupal site and the WordPress.

  • 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

Configure Application in WordPress:

  • Log into your WordPress site.
  • Go to the WordPress Dashboard -> Plugins and click on Add New.
  • Search for the OAuth Single Sign On – SSO (OAuth Client) plugin and click on the Install Now button.
  •  Drupal WordPress OAuth OIDC Provider - Login into WordPress Dashboard, Search for OAuth Single Sign On – SSO (OAuth Client) plugin
  • Once installed click on Activate.
  • Go to the Configure OAuth tab and click on the Add New Application
  •  Drupal WordPress OAuth OIDC Provider - Click on Activate, go to Configure OAuth and Add New Application
  • Search for Drupal under the search bar and click on it.
  •  Drupal WordPress OAuth OIDC Provider - Search for Drupal
  • Copy the Callback URL and click on the Next button.
  •  Drupal WordPress OAuth OIDC Provider - Copy Callback URL and click on Next

Configure Drupal as an OAuth Server:

  • Navigate to the Drupal site and go to the Configuration -> miniOrange OAuth server configuration -> OAuth Client tab.
  • Click on the Add Client button to add a new application.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - Click on Add Client
  • Enter the name of your application under the Application Name text field.
  • Paste the copied Callback/Redirect URL from the WordPress site under the Callback/Redirect URL text field.
  • You can add multiple Callback URLs by clicking on the Add More button next to the Callback/Redirect URL text field.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - Click on Add More to next the Callback URL field
  • Click on the Save button.

Configure WordPress as OAuth Client:

  • 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):-

    Authorize Endpoint {base_url_of_the_drupal_site}/mo/oauth2/authorize
    Token Endpoint {base_url_of_the_drupal_site}/mo/oauth2/token
    Userinfo Endpoint {base_url_of_the_drupal_site}/mo/oauth2/userinfo
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - Provide Scope and Endpoints in WordPress Application
  • Click on the Next button.
  • Navigate back to the Drupal site and copy the Client ID.
  • Paste the copied Client ID under the Client ID text field in the WordPress site.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - Provide Client ID in WordPress Application
  • Similarly, copy the Client Secret from the Drupal site and paste it into the Client Secret text field in the WordPress site.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - Provide Client Secret in WordPress Application
  • Navigate to the Drupal site and copy the Scope from the Scopes and Endpoints section.
  • Paste the copied Scope under the Scopes text field in the WordPress site. Click on the Next button.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - Provide Scope in WordPress Application
  • Confirm the Configurations and click on the Finish button.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - Click Finish
  • Once the Test Configuration is successful, click on the Done button.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - If Test Configuration is successful, click Done
  • Click on the Finish button.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - Click Finish
  • You have successfully configured the OAuth server module with WordPress as the OAuth client and Drupal as the OAuth server.
  •  Integrating WordPress with Drupal OAuth/OIDC Provider - You have successfully configured WordPress with Drupal

Let’s see how it works:

  • Open a new window/private browser and navigate to the login page of the WordPress website.
  • Click on the Login with Drupal button.
  • Test SSO Connection between WordPress and Drupal OIDC Provider - Click on Login with Drupal
  • Enter the Drupal credentials and click on the Log in button.
  • Login into WordPress using Drupal OIDC Provider
  • You will be logged into WordPress using Drupal credentials.

You have successfully performed the SSO between WordPress and Drupal!

Need Assistance?

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

Additional Features:

 Case Studies
miniOrange has successfully catered to the use cases of 400+ trusted customers with its highly flexible/customizable Drupal solutions. Feel free to check out some of our unique case studies using this link.
 Other Solutions
Feel free to explore other Drupal solutions that we offer here. The popular solutions used by our trusted customers include Two Factor Authentication - 2FA, Website Security, REST & JSON API Authentication, User Provisioning and Sync. 
  24*7 Active Support
The Drupal developers at miniOrange offer quick and active support for your queries. We can assist you from choosing the best solution for your use case to deploying and maintaining the solution.
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