SAML Single Sign-On (SSO) into Drupal using Auth0 as IdP
Overview
The Drupal SAML integration using the miniOrange SAML SP module establishes seamless SSO between Auth0 and the Drupal site. The users will be able to log in to the Drupal site using their Auth0 credentials. This document will walk you through the steps to configure Single Sign-On - SSO between Drupal as a Service Provider (SP) and Auth0 as an Identity Provider (IdP). The module is compatible with Drupal 7, Drupal 8, Drupal 9, and Drupal 10, and Drupal 11.
Installation Steps
- Using Composer
- Using Drush
- Manual Installation
Configuration Steps
Drupal SAML SP Metadata
- Go to Configuration → People → SAML Login Configuration in the Administration menu. (/admin/config/people/miniorange_saml/idp_setup)
- In the Service Provider Metadata tab, copy the SP Entity ID / Issuer and SP ACS URL. Keep these values handy. This information is required to configure Auth0 as SAML Identity Provider (IdP).
Setup Auth0 as SAML Identity Provider
- Log into your Auth0 admin console.
- Navigate to the Applications and select Applications.
- Click on Create Application button.
- On the Create application, enter the Name of application (in this case, DrupalSAML) and select Regular Web Applications. Click on the Create button.
- Navigate to the Addons tab and enable the SAML2 WEB APP toggle.
- On the Addon: SAML2 Web App window, navigate to the Settings tab and provide the information into the corresponding text field from the Service Provider Metadata tab of the module.
Auth0 Field Service Provider Information (Drupal) Application Callback URL SP ACS URL audience SP Entity ID/Issuer recipient SP ACS URL
- Scroll down and click on Enable button, then click Save button to save SAML SP information.
Configure Drupal as SAML Service Provider:
- Navigate to the Service Provider Setup tab of the Drupal site and click on Upload IDP Metadata.
- In the Upload Metadata File field and upload the IdP metadata file that you downloaded from Auth0. Then, click on Upload File button to proceed.
Note: To update Identity Provider Name, follow these steps:
- Under Action, select the Edit.
- Enter Auth0 in the Identity Provider Name text field.
- Scroll down and click on the Save Configuration button.
- Click on the Test link to test the connection between Drupal and Auth0.
- On a Test Configuration popup, if you don't have an active session in the Auth0 on the same browser, you will be asked to sign in to Auth0. After successfully login into Auth0, you will be provided with a list of attributes that are received from the Auth0. Click on Done
Congratulations! you have successfully configure Auth0 as SAML Identity Provider (IdP) and Drupal as SAML Service Provider.
How does SAML SSO login work?
- Open a new browser/private window and navigate to the Drupal site login page.
- Click the Login using Identity Provider (Auth0) link.
- You will be redirected to the Auth0 login page. Enter the Auth0 credentials. After successful authentication, the user will be redirected back to the Drupal site.