Search Results :

×

Configure Azure B2C OAuth Single Sign-On (SSO) in Prestashop | Azure B2C SSO

Configure Azure B2C OAuth Single Sign-On (SSO) in Prestashop | Azure B2C SSO


Prestashop OAuth Client module allows you to perform secure Single Sign-On (SSO) into your Prestashop store using Azure B2C as OAuth provider. Configure Prestashop OAuth Client for user authentication which verifies the identity of a user attempting to gain access to Prestashop with Azure B2C Login. Prestashop OAuth Client Single Sign-On (SSO) module also configures custom providers and standard IDPs. It supports advanced Single Sign-On (SSO) features such as user profile Attribute mapping, Role mapping, etc. along with other Active Directory Services. Here we will go through a guide to set up Prestashop OAuth Client with Azure B2C login credentials. Adding Azure B2C OAuth Single Sign-On (SSO) to Prestashop lets your users quickly and securely log in to your Prestashop store with Azure B2C login without having to remember a username and password.

Pre-requisites: Download And Installation

You need to download and install the miniOrange OAuth Client plugin to set up Single Sign-On with your Prestashop Store.

Steps to configure Azure B2C OAuth Login with Prestashop

1. Setup Azure B2C as OAuth Provider

  • Sign in to Azure portal.
  • Go to Home and in the Azure services, select Azure AD B2C.
  • Azure B2C Single Sign-on (SSO) - Azure B2C Portal
  • Please make sure you are in the Azure AD B2C directory with an active subscription and if not, you can switch to the correct directory.

  • Azure B2C Single Sign-on (SSO) - Active Services
  • In the Essentials tab, you will find the Azure B2C domain name, keep it handy, you will need it later for configuring the Azure B2C tenant name under Prestashop as an OAuth client.

  • Azure B2C Single Sign-on (SSO) - Domain Name
  • Now, click on App registrations and then click on the New registration option to create a new Azure b2c application.

  • Azure B2C Single Sign-on (SSO) - New Application
  • Configure the following options to create a new application.
    • Enter a name for your application under the Name text field.
    • In supported account types, select 3rd option ‘Accounts in any identity provider or organizational directory (for authenticating users with user flows)’.
    • In the Redirect URI section, select the Web application and enter the Callback URL from the miniOrange OAuth Client plugin (Configure OAuth tab) and save it under the Redirect URL textbox.
    • Click on the Register button to create your application.

  • Azure B2C Single Sign-on (SSO) - Application Registration
  • After successful application creation, you will be redirected to the newly created application’s overview page. If not, you can go to the app registrations and search the name of your application and you will find your application in the list.
  • Copy your Application ID and keep it handy, you will need it later for configuring the Client ID under Prestashop as an OAuth Client plugin.

  • Azure B2C Single Sign-on (SSO) - Client Id
  • Now, click on Certificates and secrets and then click on New client secret to generate a client secret. Enter a description and click on the Add button.

  • Azure B2C Single Sign-on (SSO) - Certificates and Secrets Azure B2C Single Sign-on (SSO) - Certificates and Secrets
  • Copy the secret value from the certificates & secrets page and keep it handy, you will need it later for configuring the Client Secret under Prestashop as an OAuth Client plugin.

  • Azure B2C Single Sign-on (SSO) - Secret Value

1.1: Add Users in your b2c application

  • In the home page, go to the Users tab in the left corner.
  • Click on New user on the Users page.

  • Azure B2C Single Sign-on (SSO) - New Users
  • Select Create Azure AD B2C user. Then, scroll down and click on Email from sign-in method and set your password and click Create to save the user details to perform test configuration.

  • Azure B2C Single Sign-on (SSO) - Create New User Azure B2C Single Sign-on (SSO) - Create New User

1.2: How to create & add Azure B2C Policy

  • Go to the User Flows tab and then click on New user flow.

  • Azure B2C Single Sign-on (SSO) - User Flows
  • Select a User flow type Sign up and Sign in then click on Create button.

  • Azure B2C Single Sign-on (SSO) - Sign Up and Sign in Azure B2C Single Sign-on (SSO) - Version
  • Fill in all the information e.g. Name, Identity providers, etc. then click on Create button.

  • Azure B2C Single Sign-on (SSO) - User Information

1.3: Add user claims to your application

  • Go to User Flows under policies in the left corner. Select the configured policy.

  • Azure B2C Single Sign-on (SSO) - Policy Claims
  • Select Application claims in settings.

  • Azure B2C Single Sign-on (SSO) - Application Claims
  • Select the desired attributes to be displayed on the test configuration and save it.

  • Azure B2C Single Sign-on (SSO) - User Attributes
  • Go to user flows and search for your policy name and copy it. It will be later required while setting up the Prestashop as an OAuth client.

  • Azure B2C Single Sign-on (SSO) - Policy Name
  • Go to App Registrations and click on Endpoints. Copy the Azure AD B2C OAuth 2.0 token endpoint and Azure AD B2C OAuth 2.0 authorization endpoint. These will be your OAuth token endpoint and OAuth Redirect callback.

  • Azure B2C Single Sign-on (SSO) - Endpoints

    You have successfully configured Azure AD B2C as OAuth Provider for achieving user authentication with Azure AD B2C Single Sign-On (SSO) login into your Prestashop Store.

2. Setup Prestashop as OAuth Client

  • Go to the OAuth Client section in the module and enter the following details:
  • Azure B2C OAuth Endpoints and Scope:


    OAuth Client ID Enter the value copied from Azure Application in the previous steps
    OAuth Client Secret Enter the value copied from Azure Application in the previous steps
    OAuth Scope openid
    OAuth Redirect callback Enter the value copied from Endpoints in Azure B2C Application and replace with the policy name copied earlier
    OAuth Token endpoint Enter the value copied from Endpoints in Azure B2C Application and replace with the policy name copied earlier
    OAuth user info endpoint https://graph.microsoft.com/v1.0/me

  • Click on Save to save the configuration.

3. Testing SSO

  • Once you Save the configuration, click on Test Configuration to test the SSO. You will see the following attributes sent from your Azure B2C Application:
  • Azure B2C Single Sign-on (SSO) - Testing SSO

    4. Attribute Mapping

    • User Attribute Mapping is mandatory for enabling users to successfully login into Prestashop.
    • Once you receive the User attributes from the Test Configuration window, enter the following fields in the Attribute Mapping section of the module:
    • First Name given_name
      Last Name family_name
      Username email
      Email email
      Azure B2C Single Sign-on (SSO) - Attibute Mapping
    • Click on Save.

    You've successfully configured Prestashop as OAuth Client to securely gain access to the Prestashop store with Azure B2C OAuth sign-in. Prestashop OAuth Client module improves the Prestashop login process for user authentication.

    Additional Resources



    We offer Secure Identity Solutions for Single Sign-On, Two Factor Authentication, Adaptive MFA, Provisioning, and much more. Please contact us at

     +1 978 658 9387 (US) | +91 97178 45846 (India)   samlsupport@xecurify.com

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