Search Results :

×

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

miniOrange allows AWS Cognito to act as an IDP (Identity Provider), which allows users to Single Sign-On (SSO) into Shopify using AWS Cognito 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 AWS Cognito as IdP (Identity Provider) and Shopify store as SP (Service Provider).

To configure SSO into Shopify with AWS Cognito as 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 learn more about how Shopify SSO application works in Shopify.


Setup guide for Configuring AWS Cognito as IDP for SSO into Shopify

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

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

  • Select OAuth 2.0 protocol.
Shopify Cognito SSO - Select OAuth 2.0 Protocol

  • Now choose AWS Cognito from the list of IDPs.
Shopify Cognito SSO - Choose AWS Cognito as IDP

  • Copy the OAuth Callback URL and keep it handy as it will be used in further steps.
Copy Callback URL from SSO App

  • Go to Amazon Console and sign up/log in to your account to Configure AWS Cognito.
Shopify Cognito SSO - Login to your AWS Cognito Application

  • Search for Cognito in the AWS Services search bar as shown below.
Shopify Cognito SSO - Search Cognito in App Services

Note and Contact Us - SSO between two WordPress sites

Note: If you already have a User Pool then follow the steps provided here, else follow the steps provided below.


  • Click on Create a User Pool button to create a new User Pool.
Shopify Cognito SSO - Create User Pool

  • Select the Application type as a Traditional web application. Provide a name for your application and choose the attributes in your user pool to be used during the sign-in process. Select the attributes that you require during the sign-up process from the Required attributes for the sign-up section.
Shopify Cognito SSO - Provide User Pool Details

  • Paste the Callback URL that has been copied from Step 1 in the Return URL field under the Add a Return URL section. Click on the Create button.
Shopify Cognito SSO - Paste Callback URL

  • Scroll down and click on the Go to Overview button.
Shopify Cognito SSO - Click on Go to Overview button

  • To configure how your user pool sends email messages to users, navigate to the Authentication methods under the Authentication tab and click on Edit under the Email section.
Shopify Cognito SSO - Navigate to Authentication Tab

  • Here you can add email address from which your user pool sends email messages to users. Click on Save Changes.
Shopify Cognito SSO - Provide Email to Send message

  • Navigate to the App Clients tab under the Applications section, and select your App Client. If you don't have an app client, then click on Create app client button.
Shopify Cognito SSO - Navigate to App Client Section

  • Copy the Client ID and Client Secret and keep them handy as they will be used in further steps.
Shopify Cognito SSO - Copy Client ID and Secret

  • Go to the Attribute permissions tab. Click on the Edit and select the attributes that you want during the sign-up process. Click on Save.
Shopify Cognito SSO - Select Attributes you want in Shopify

  • Now go to the Login pages tab and click on the Edit button as shown in the below image.
Shopify Cognito SSO - Click on Edit for SSO Configurations

  • Verify that the Callback URL is added to the URL field under the Allowed Callback URLs section and under the Identity Provider section, the Identity Provider selected is the Cognito user pool, and select Authorization code grant under the OAuth 2.0 grant types. Under the OpenID Connect scopes section the scopes selected are Email, OpenID, and Profile. (Please refer to the images below) Click on the Save Changes button.
Shopify Cognito SSO - Select Authorization Code Grant
Shopify Cognito SSO - OAuth Grant Type and Scopes

  • Go to the Users tab under the User Management section, and click Create user.
Shopify Cognito SSO - Create New user

  • Enter details such as email address, phone number & password. Click on Create user to save the details.
Shopify Cognito SSO - provide email, password

  • Go to the Domain tab under the Branding section and copy the complete domain name {your domain name}.auth.{region name}.amazoncognito.com. This should be entered into the endpoints field under the Shopify Single Sign-On (SSO) application so keep them handy.
Shopify Cognito SSO - Copy Domain Name

You have completed the AWS Cognito side configuration to configure SSO into Shopify using AWS Cognito Credentials.

  • Navigate back to the miniOrange Single Sign On-SSO application and click on the Add Identity Provider button.
Shopify Cognito SSO - Go to Shopify SSO App

  • Select OAuth 2.0 protocol.
Shopify Cognito SSO - Select OAuth 2.0 protocol

  • From the list of IDPs, select AWS Cognito.
Shopify Cognito SSO - Select Cognito IDP

  • Now, fill in the required details like Client ID, Client Secret, Endpoints, and Scope.
  • Please refer to the below table for configuring the values.
IDP Display Name Choose the appropriate name
Authorize Endpoint https://{cognito-app-domain}/oauth2/authorize
Access Token Endpoint https://{cognito-app-domain}/oauth2/token
User Info Endpoint (optional) https://{cognito-app-domain}/oauth2/userInfo
Client ID from Step 2
Client secret from Step 2
Scope openid
Shopify Cognito SSO - Provide Client ID and Secret, Scopes and endpoints

  • Now you can click on Save.

You have completed the Shopify side configuration to set up SSO between AWS Cognito and Shopify.

  • 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.
Shopify Cognito SSO - test Connection

  • On entering valid AWS Cognito account credentials you will see a pop-up window which is shown in the below screen.
Shopify Cognito SSO - Enter AWS Account Credentials

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

  • Click on the + Attribute Mapping button to map attributes between Shopify and Cognito.
Shopify Cognito SSO - Map Atrribute between Shopify and Cognito

  • Map the attributes by referring to the table below:
Attribute Name in Shopify Choose the attribute from the list of predefined attributes
Attribute Type IDP Attribute
Attribute Value Select the attribute value you have fetched from your IDP
Shopify Cognito SSO - Map IDP Attributes

  • Click on Save.
Shopify Cognito SSO - Save

  • Navigate to the application home page. Go to More actions against the IDP you have configured and click on the Make Default button to make the IDP default.
Shopify Cognito SSO - Make Cognito Default IDP

  • Go to your Shopify Store login page.(https:///account/login)
  • Click on the login button you customized earlier.
Shopify Cognito SSO - Click on Login Button

  • 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 Cognito SSO - Encounter Recaptch Error

  • Otherwise, you’ll be redirected to the login page of the IDP you configured in the previous step. Log in with your IDP account credentials.
  • You’ll be successfully logged in to your Shopify store.

In this Guide, you have configured AWS Cognito Single Sign-On (SSO) by configuring AWS Cognito as an OAuth Provider and Shopify as an OAuth Client using our Shopify Single Sign-On - SSO Login App. This solution ensures that you are ready to roll out secure access to your Shopify Store using AWS Cognito login credentials within minutes.


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
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