Search Results :

×

Login into Drupal Using Magento Credentials | Magento as IDP Single Sign-On (SSO) in Drupal

Login into Drupal using Magento user credentials. This guide will help you integrate Magento as an Identity Provider (IdP) and Drupal as a Service Provider (SP) using the miniOrange Magento IDP (Identity Provider) Extension. Magento as IDP extenstion gives you the ability to use your Magento credentials to login into Drupal (SP). Here we will go through a step-by-step guide to configure SSO between Drupal as SP (Service Provider) and Magento as IDP (Identity Provider).

  • Purchase the miniOrange SAML IDP Single Sign-On extension from Magento / Adobe Commerce Marketplace.
  • Go to My profile -> My Purchases
  • Please ensure you are using correct access keys (My Profile - Access Keys)
  • Paste the access keys in your auth.json file inside your project
  • Use the below command to add the extension to your project.
    "composer require {module_name}:{version}"
  • You can see the module name and list of versions in the selector below the extension name.
  • Run the following commands on command prompt to enable the extension.
  • php bin/magento setup:upgrade
  • After installation, the miniOrange Magento IDP extension will appear in the left-hand section of the dashboard.
  • Magento SAML IDP  | Login with Magento Users - Magento SSO
  • Download the miniOrange Magento IDP Single Sign-On extension.
  • Unzip all contents of the zip inside the MiniOrange/IDPSaml directory.
  • {Root Directory of Magento} app code MiniOrange IDPSaml
  • Run the following commands on command prompt to enable the extension
  • php bin/magento setup:upgrade

Step 1. Prerequisites

  • Go to ConfigurationPeopleSAML Login Configuration in the Administration menu. (/admin/config/people/miniorange_saml/idp_setup)
  • Configuration-Drupal-Select-miniOrange-SAML-Login-Configuration

  • Under the Service Provider Metadata tab, copy the SP Entity ID/Issuer & SP ACS URL. (keep it handy)
  • Drupal SAML Single Sign-On - Copy XML Metadata to configure Magento as IdP


Step 2. Configuring Magento as SAML Identity Provider (IdP)

  • In the miniOrange IDP (Identity Provider) extension, go to Applications tab.
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • Select SAML from the applications menu and search for Drupal in the choose application searchbox and select the application.
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • Enter the Application name under SP Name.
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • Now, enter the SP Entity ID or Issuer and ACS URL copied earlier and save the details.
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO

Step 3. Configure Drupal as Service Provider

  • Navigate to the Applications tab and click on Metadata settings for the Drupal application
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • Here, you can find the Identity Provider Metadata URL /XML Metadata or endpoints like IDP Entity ID, SAML Login URL, SAML Logout URL (Premium Feature), Certificate. You can also download the IdP Metadata XML file which will be used for Drupal configuration.
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • You will now have 3 options to provide the IDP Metadata to Drupal by downloading the XML Metadata, Metadata URL or providing the detials manually.
  • Option 1 - Download the XML Metadata.
  • Download the XML Metadata by clicking it on Download XML Metadata button.
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • Navigate to your Drupal and upload the XML metadata file downloaded and click on the Fetch Metadata button.
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • Option 2 - Metadata URL.
  • You can also copy the Metadata URL and provide it to your service provider to fetch the metadata.
  • Magento SAML IDP  | Login with Magento Users - Drupal SSO into Magento
  • Paste the Metadata URL in the Upload Metadata URL text field and click on Fetch Metadata button.
  • Magento SAML IDP  | Login with Magento Users - Drupal SSO into Magento
  • Option 3 - Provide the details manually to the Drupal.
  • Copy the metadata details according to the table below.
  • Magento SAML IDP  | Login with Magento Users - Magento Drupal SSO
    IDP-EntityID / Issuer IDP-EntityID / Issuer
    Single Sign On URL SAML Login URL / Passive Login URL
    SAML X509 Certificate Certificate
  • Navigate to your Drupal and paste the metadata details.

Step 4. Attribute Mapping *(This is a Premium Feature)

  • In the miniOrange Magento IDP extension, navigate to the Applications tab and click on Edit settings for the Drupal application.
  • Magento 2 SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • Click on Add Attribute button.
  • Magento 2 SAML IDP  | Login with Magento Users - Magento Drupal SSO
  • Add the attribute name you want to send to your service provider and select the attribute from the dropdown menu and click on Save Button to save changes.
  • Magento 2 SAML IDP | Login with Magento Users - Magento Drupal SSO

You have successfully configured the SAML SSO between Drupal as SAML Service Provider and Magento as SAML Identity Provider.


Step 1. Configuring Drupal as OAuth Client:

  • After installing the module, go to the Configuration tab and click on the miniOrange OAuth Client Configuration -> Configure OAuth tab and select the application from the Select Application dropdown list.
  • Copy the Callback/Redirect URL and keep it handy. This will be required while configuring the OAuth Provider.
  • Enter the name in the App Name text field.
  • Drupal as OAuth Client - Under Configure OAuth -> Select Application - Copy Callback/Redirect URL and provide the Display name

Step 2. Configure Magento as OAuth Server

  • In the miniOrange IDP extension, go to Applications tab.
  • Magento as IDP Add Application

  • Select OAuth/OpenID from the applications menu.
  • Magento as IDP OAuth

  • Search for Drupal in the choose application searchbox and select the application.
  • Magento as IDP Choose App

  • Enter the OAuth Client Name as Drupal
  • Magento as IDP client name

  • Paste the Redirect URL copied earlier in the Redirect URL field.
  • Magento as IDP redirect URL

  • Enter openid email profile in the scope field and save the changes.
  • Magento as IDP scope

  • Navigate to the Applications tab and click on Edit settings for your application
  •  Magento as IDP edit app

  • You would see that the Client ID and Client Secret are automatically generated. Copy them and keep them handy.
  • Magento as IDPclient id secret

  • Paste the Client ID and Client Secret in the Drupal.
  • Magento as IDPclient id secret

  • Navigate back to the Magento IDP extension and Click on Click Here link to get the Magento OAuth Endpoints
  • Magento as IDP go to endpoints

  • Here you would receive all the Endpoints. Copy them as requried.
  • Magento as IDP copy endpoints

  • Paste the Endpoints in the endpoints field in your Drupal and click on Finish to save the configuration.
  • Magento as IDP endpoints


Step 3. Attribute Mapping (This is a Premium Feature)

  • In the miniOrange Magento IDP extension, navigate to the Applications tab and click on Edit settings for your application.
  • Magento as IDP - Edit app

  • Add the attribute name you want to send to your OAuth Server and select the attribute from the dropdown menu.
  • Magento as OAuth Server - Attribute Mapping

  • Click on Add Attribute and add the attribute name you want to send to your OAuth Client and select the attribute from the dropdown menu and click on Save Button to save changes.
  • Magento as OAuth Server - add and save attribute mapping

You have successfully configured the OAuth SSO between Drupal as OAuth Client and Magento as OAuth Server.


Please reach out to us at magentosupport@xecurify.com, and our team will assist you with setting up the Magento IDP SSO Extension. Our team will help you to select the best suitable solution/plan as per your requirement.

ADFS_sso ×
Hello there!

Need Help? We are right here!

support