Search Results :

×

OAuth Single Sign-On (SSO) For Shopify Using Keycloak as Identity Provider

miniOrange allows Keycloak to act as an IDP (Identity Provider), which allows users to Single Sign-On (SSO) into Shopify using Keycloak Credentials. Our application is compatible with all the SAML / OAuth compliant Identity Providers. We will go through a step-by-step guide to configure Single Sign-On (SSO) into Shopify using Keycloak as IdP (Identity Provider) and Shopify store as SP (Service Provider).

To configure SSO into Shopify using Keycloak as an identity provider (IDP), you will need to install the miniOrange Shopify Single Sign-On - SSO Login Application on your store.


Youtube-color Created with Sketch.

Check out our video, to know more about how Single-Sign-On works in Shopify.

Follow the step-by-step guide for Single Sign-On in Shopify store Using Keycloak as an identity provider.

  • Go to your Shopify store and navigate to the App section and click on Single Sign On - SSO login application.
  • Shopify Keycloak Login SSO - Add SSO Application

  • Click on the Add identity Provider button to add your IDP.
  • Shopify Keycloak Login SSO - Add Identity Provider

  • Select OAuth 2.0 protocol.
  • Shopify Keycloak Login SSO - Select OAuth Protocol

  • Now choose Keycloak from the list of identity providers (IDPs).
  • Shopify Keycloak Login SSO - Select Keycloak as identity provider

  • Copy the OAuth Callback URL and keep it handy as it will be used in further step.
  • Shopify Keycloak Login SSO - Get Callback URL
  • First of all, Download Keycloak and install it.
  • Start the keycloak server based on your keycloak version. (See table below)
  • For the Keycloak Version 16 and below

    Go to the Root Directory of keycloak bin standalone.sh

    For the Keycloak Version 17 and above

    Go to the Root Directory of keycloak bin kc.bat and run the below commands.
    1. kc.bat build
    2. kc.bat start-dev

Add Realm:

  • Now login to keycloak administration console and navigate to your desired realm. You can add new realm by selecting Add Realm option.
  • Shopify Keycloak OAuth SSO - add realm

Create realm:

  • Enter Realm Name and keep the realm name handy as it will required later to configure the Realm under the OAuth Client plugin. Click on CREATE to add realm.
  • Shopify Keycloak OAuth SSO - Create realm

Create OpenID client:

  • Click on the Clients and choose create to create a new client. Enter Client ID and select client protocol openeid-connect and select Save. Keep this value handy as this will be used in furthur steps.
  • Shopify Keycloak OAuth SSO - client id

Change Access type:

  • After client is created change its access type to confidential.
  • Shopify Keycloak OAuth SSO - change access type

Enter Valid Redirect URIs:

  • Paste the copied Callback URL from Step 1 and then click on SAVE.
  • Shopify Keycloak OAuth SSO - Enter Valid Redirect URIs

Get Client Secret:

  • Now we need to get client secret. So select Clients and select credentials and copy your secret from here. Keep the Client Secret value handy as this will be used in furthur step.
  • Shopify Keycloak OAuth SSO - Client Secret

Add User:

  • We need to add users to realm who will be able to access the resources of realm. Click on the Users and choose to Add a new User.
  • Shopify Keycloak OAuth SSO - Add user to keycloak

User Configuration:

  • After user is created following action needs to be performed on it.
    • 1) Setting a password for it so click on Credentials and set a new Password for the user. Shopify Keycloak OAuth SSO - Setting a password for User Configurations

    NOTE : Disabling Temporary will make user password permanent.

Map User:

  • We need to map user to a role. Click on Role Mappings and assign the user desired role from available roles and clicking on add selected.
  • Shopify Keycloak OAuth SSO - Map users

Create ROLE:

  • The Role will be used by your applications to define which users will be authorized to access the application. Click on the Roles and choose Add Role.
  • Shopify Keycloak OAuth SSO - Create Role

Step 1.1: Steps to fetch Keycloak Groups [Premium]

  • Create groups: Click on the Groups and choose New to create a new group.
  • Shopify Keycloak OAuth SSO - Create Groups

  • Assign user to group: Select the user whom you want to add in group. Choose Groups option from tab and then select the group-name and click on join.
  • Shopify Keycloak OAuth SSO - Assign User to Group

  • Keycloak Group Mapper: Now to get group details we need to perform its client mapping with group membership else group details will not be fetched. So in Client section, select your client and then click on mapper->create.
  • Shopify Keycloak OAuth SSO - Group Mapper

  • Now, select mapper type as Group Membership and enter the name and token claim name i.e the attribute name corresponding to which groups will be fetched. Turn Off the full group path, Add to ID token and Add to access token options, and click on Save.
  • Shopify Keycloak OAuth SSO - Select Mapper Type

    Note: -- If full path is on group path will be fetched else group name will be fetched.

Step 1.2: Steps to fetch Keycloak Roles [Premium]

  • Keycloak Role Mapper: Now to get role details for a successful Keycloak Single Sign-On (SSO) we need to perform its client mapping with role membership else role details will not be fetched. So in Client section, select your client and then click on mapper->create.
  • Shopify Keycloak OAuth SSO - Role Mapper

  • Now, select mapper type as user realm Role Membership and enter the name. and token claim name i.e the attribute name corresponding to which groups will be fetched. Add to ID token and Add to access token options, and click on Save.
  • Shopify Keycloak OAuth SSO - Select Mapper Type

Add Realm:

  • Now login to keycloak administration console and navigate to your desired realm. You can add new realm by selecting Create Realm option.
  • Shopify Keycloak OAuth SSO - Add realm

Create realm:

  • Enter Realm Name and keep the realm name handy as it will required later to configure the Realm under the OAuth Client plugin. Click on CREATE to add realm.
  • Shopify Keycloak OAuth SSO - Create Realm

Create OpenID client:

  • Click on the Clients and choose Create Client to create a new client. Enter Client ID and select client protocol openid-connect and click Next. Keep this value handy as it will me used in furthur steps.
  • Shopify Keycloak OAuth SSO - Create Client

  • Enable the Client Authentication and Authorization toggle.
  • Shopify Keycloak OAuth SSO - Enable Client Authentication

  • Scroll down to the Access settings and paste the copied Callback/Redirect URL from Step 1.
  • Shopify Keycloak OAuth SSO - Scroll down to Access Settings

  • Go to the Credentials tab, copy the Client Secret and keep it handy as we will require it later while configuring Shopify Single Sign-On application.
  • Shopify Keycloak OAuth SSO - Copy Client Secret

Add User:

  • We need to add users to realm who will be able to access the resources of realm. Click on the Users and Click on Create new user to Add a new User.
  • Shopify Keycloak OAuth SSO - Add User

User Configuration:

  • After user is created following action needs to be performed on it.
  • 1) Setting a password for it so click on Credentials and set a new Password for the user.
  • Shopify Keycloak OAuth SSO - User Configurations

NOTE : Disabling Temporary will make user password permanent.

Map User:

  • We need to map user to a role. Click on Role Mappings and assign the user desired role from available roles.
  • Shopify Keycloak OAuth SSO - Map users

Create ROLE:

  • The Role will be used by your applications to define which users will be authorised to access the application. Click on the Roles and choose Create Role.
  • Shopify Keycloak OAuth SSO - Create and Add rule

In conclusion, you have successfully configured Keycloak as OAuth Provider, for achieving SSO into Shopify for user authentication.

Please refer the below table for configuring the scope & endpoints for Keycloak Version 18 and above in the plugin.

Scope: email profile openid
Authorize Endpoint: <keycloak domain>/realms/{realm-name}/protocol/openid-connect/auth
Access Token Endpoint: <keycloak domain>/realms/{realm-name}/protocol/openid-connect/token
Get User Info Endpoint: <keycloak domain>/realms/{realm-name}/protocol/openid-connect/userinfo
Custom redirect URL after logout: [optional] https://{keycloak domain}/realms/{realm-name}/protocol/openid-connect/logout?post_logout_redirect_uri={encodedRedirectUri}&id_token_hint=##id_token##

Please refer the below table for configuring the scope & endpoints for Keycloak Version 17 and below in the plugin.

Scope: email profile openid
Authorize Endpoint: <keycloak domain>/auth/realms/{realm-name}/protocol/openid-connect/auth
Access Token Endpoint: <keycloak domain>/auth/realms/{realm-name}/protocol/openid-connect/token
Get User Info Endpoint: <keycloak domain>/auth/realms/{realm-name}/protocol/openid-connect/userinfo
Custom redirect URL after logout: [optional] <keycloak domain>/auth/realms/{realm-name}/protocol/openid-connect/logout?redirect_uri=encodedRedirectUri
  • Navigate back to the miniOrange Single Sign On-SSO application and click on Add identity Provider button.
Shopify Keycloak Login SSO - single sign on application

  • Select OAuth protocol.
Shopify Keycloak Login SSO - Select OAuth protocol

  • From the list of identity providers (IDPs), select Keycloak.
Shopify Keycloak Login SSO - Select Keycloak as IDP

  • Please refer to the below table for configuring the values:
IDP Display Name Keycloak
Client ID from Step 2
Client secret from Step 2
Scope and Endpoint from Step 3
Shopify Keycloak Login SSO - Import Keycloak Metadata

  • Click on Save.
In conclusion, you have configured Shopify as service provider, for achieving SSO into Shopify using Keycloak as IDP for user authentication.
  • After saving the IDP configuration, you will be redirected to the Test Connection step.
    Please perform Test Connection before mapping or fetching attributes, test connection ensures that your IDP configuration is correct.
  • Click on the Test Connection button.
Test Connection - Shopify AWS Cognito SSO

  • On entering valid IDP credentials you will see a pop-up window which is shown in the below screen.
Connection Succesfull - Shopify AWS Cognito SSO

  • Click on the Fetch Attributes button to fetch the IDP attribute.
Fetch Attributes - Shopify AWS Cognito SSO

  • Click on the + Attribute Mapping button to map attributes between Shopify and your IDP.
Attribute Mapping - Shopify AWS Cognito SSO

  • Map the attributes by referring to the table below:
Attribute Name in Shopify Select the Shopify customer attribute key in which you want to sync incoming attribute value from IDP
Attribute Type IDP Attribute
Attribute Value Select the attribute key which you have fetched from your IDP and want to sync in Shopify
Map Attributes - Shopify AWS Cognito SSO

  • Click on Next.

Select Shopify Store Type:

SSO Configuration in Non-Plus Shopify Stores

Choose the type of account you have enabled on your Shopify Store:

  • Go to the application dashboard, enable the customer accounts extension as shown in the below image.
Shopify ADFS SSO Login - Enable Customer

  • Enable the New Customer Accounts extension and click on Save.
Shopify ADFS SSO Login - Enable /wp-content/uploads/2025/05/shopify-sso-paste-multipass-token.webps

  • Navigate to the application home page and enable the IDP Login toggle option against the IDP you have configured.
Shopify ADFS SSO Login - Make app default

Testing Single Sign-On (SSO) for your Shopify store

  • Go to your Shopify Store.(https://<your-shopify-storedomain>)
  • Click on the User login icon.
SSO Login into Store - Shopify miniOrange SSO

  • You’ll be redirected to the login page of the identity provider (IDP) you configured in the previous step. Log in with your IDP account credentials.
  • Next, enter the six-digit OTP that will be sent to your registered email address. (This is a one-time process)
Shopify miniOrange SSO - 6 Digit OTP customer accounts

  • You’ll be successfully logged in to your Shopify store.
  • Go to the application dashboard, you will see a warning box to add the login button extension on the Account page, click on the login widget extension link as shown in the below image to enable it.
Shopify ADFS SSO Login - Make app default

  • Navigate to the application home page and enable the IDP Login toggle option against the IDP you have configured.
Shopify ADFS SSO Login - Make app default

  • If you want to configure SSO into Shopify using multiple IDPs, then select your IDP from the list provided here, and setup SSO using that IDP.
  • Enable the IDP login toggle option for enabling SSO into Shopify using multiple IDPs.
Shopify ADFS SSO Login - Make app default

Testing Single Sign-On (SSO) for your Shopify store

  • Go to your Shopify Store login page.(https://<your-shopify-storedomain>/account/login)
  • Click on the login button you customized earlier.
SSO Login into Store - Shopify miniOrange SSO

  • You'll be redirected to the identity provider (IDP) login page. Now log in with your existing account credentials.
  • After login, if you encounter an "invalid or missing reCAPTCHA token" error, accompanied by a "Something went wrong" message, refer to this FAQ to resolve the error.
Shopify miniOrange SSO - Something went wrong error

SSO Configuration in Plus Shopify Stores

Choose the type of account you have enabled on your Shopify Store:

  • Go back to the SSO application, and navigate to Connect Store tab. Copy the Client ID, Client Secret, Post-Logout Redirect URL and Discovery Endpoint URL and keep them handy.
Shopify ADFS SSO Login - Copy Client ID and Secret

  • Click on the Customer Accounts link as shown in the below image.
Shopify ADFS SSO Login - Click on Customer Accounts

  • Select the Customer accounts option recommended by Shopify & look for the Identity Provider option, if not present please reach out to shopifysupport@xecurify.com.
Shopify ADFS SSO Login - Select Customer Accounts option

  • If the identity provider is present, click on Manage.
Shopify ADFS SSO Login - Click Manage

  • Click on Connect to Provider button.
Shopify ADFS SSO Login - Connect to identity provider

  • Add the Identity Provider name and fill in the details such as Discovery endpoint URL, Client ID, Client secret, Additional Scopes, Post-logout redirect URI parameter that you copied from above step. Click on Save.
Shopify ADFS SSO Login - Add identity provider name

Shopify ADFS SSO Login - Add metadata

  • Once the Identity Provider has been added, do the Test Connection.
Shopify ADFS SSO Login - Test Connections

  • After verifying the flow make the identity provider as Active.
Shopify ADFS SSO Login - Make identity provider active

  • Navigate to the application home page and enable the IDP Login toggle option against the IDP you have configured.
Shopify ADFS SSO Login - Make app default

Testing Single Sign-On (SSO) for your Shopify store

  • Go to your Shopify Store.(https://<your-shopify-storedomain>)
  • Click on the User login icon.
SSO Login into Store - Shopify miniOrange SSO
  • You’ll be redirected to the login page of the identity provider (IDP) you configured in the previous step. Log in with your IDP account credentials.
  • You’ll be successfully logged in to your Shopify store.
  • Now, click on the Setup Guide button and follow the steps mentioned to get multipass token.
Shopify ADFS SSO Login - Get multipass token

  • Enable the Multipass Token option. Refer to this Faq to get the Multipass token value and paste it in the below field.
Shopify ADFS SSO Login - Enable multipass token

  • Click on Save.
  • Go to the application dashboard, you will see a warning box to add the login button extension on the Account page, click on the login widget extension link as shown in the below image to enable it.
Shopify ADFS SSO Login - Make app default

  • Navigate to the application home page and enable the IDP Login toggle option against the IDP you have configured.
Shopify ADFS SSO Login - Make app default

  • If you want to configure SSO into Shopify using multiple IDPs, then select your IDP from the list provided here, and setup SSO using that IDP.
  • Enable the IDP login toggle option for enabling SSO into Shopify using multiple IDPs.
Shopify ADFS SSO Login - Make app default

Testing Single Sign-On (SSO) for your Shopify store

  • Go to your Shopify Store login page.(https://<your-shopify-storedomain>/account/login)
  • Click on the login button you customized earlier.
SSO Login into Store - Shopify miniOrange SSO

  • You'll be redirected to the identity provider (IDP) login page. Now log in with your existing account credentials.
  • If you encounter an "invalid or missing reCAPTCHA token" error, accompanied by a "Something went wrong" message, refer to this FAQ to resolve the error.
Shopify miniOrange SSO - Something went wrong error

  • You’ll be successfully logged in to your Shopify store.
More FAQs ➔

Follow the steps outlined here to configure SSO in Shopify with your preferred IDP.

Redirection to any other site might be blocked in the browser. Please follow the steps given here to resolve the issue.

Follow the steps outlined here to redirect your customer to collections/cart or any other page.

You must upgrade to the SSO application’s Enterprise plan to enable the Auto-Redirect to the IDP feature. Follow the steps outlined here to enable this feature.

Please reach out to us at shopifysupport@xecurify.com, and our team will assist you with setting up the Shopify SSO application. 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