WordPress Drupal Single Sign-On – SSO Integration using OpenID Connect protocol
Overview
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, Drupal 10, and Drupal 11.
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.
Configuration Steps
SConfigure 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.
- Once installed click on Activate.
- Go to the Configure OAuth tab and click on the Add New Application
- Search for Drupal under the search bar and click on it.
- Copy the Callback URL and click on the Next button.
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.
- 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.
- 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):
Scope | profile openid email |
---|---|
Authorization Endpoint | {base_url_of_the_drupal_site}/mo/oauth2/authorize |
Token Endpoint | {base_url_of_the_drupal_site}/mo/oauth2/token |
Get User Information Endpoint | {base_url_of_the_drupal_site}/mo/oauth2/userinfo |
- 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.
- Similarly, copy the Client Secret from the Drupal site and paste it into the Client Secret text field in the WordPress site.
- 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.
- Confirm the Configurations and click on the Finish button.
- Once the Test Configuration is successful, click on the Done button.
- Click on the Finish button.
- You have successfully configured the OAuth server module with WordPress as the OAuth client and Drupal as the OAuth server.
Let’s see how this works:
- Open a new window/private browser and navigate to the login page of the WordPress website.
- Click on the Login with Drupal button.
- Enter the Drupal credentials and click on the Log in button.
- 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.