Skip to main content
Docs

Integrate Shopify with Clerk

You will learn the following:

  • Configure Shopify to use Clerk for authentication

This tutorial outlines how to integrate Clerk's authentication with your Shopify Plus store, allowing you to use Clerk as your identity provider for customer logins. In Shopify, using your own Identity Provider for customer login is only available to stores on the Shopify Plus plan.

To make the setup process easier, it's recommended to keep two browser tabs open: one for your Clerk Dashboard and one for your Shopify admin.

Create a new Clerk OAuth application

  1. In the Clerk Dashboard, navigate to the OAuth applications page.
  2. Select Add OAuth application. A modal will open.
  3. Enter the Name of your new OAuth application.
  4. For the Scopes, ensure to select openid. The following scopes should be enabled: openid, email, and profile.
  5. Select Add. You'll be presented with the Client Secret.
  6. Select Copy secret and save the value somewhere secure. You'll be redirected to the OAuth app's settings page.
  7. Under Application Credentials, copy and save the Client ID somewhere secure.
  8. Under Application Configuration URLs, copy and save the Discovery URL somewhere secure. Keep this page open.

Connect a new Shopify provider

  1. In a new tab, navigate to your Shopify admin.
  2. In the left sidebar, select Settings. You'll be redirected to your shop's General settings page.
  3. In the left sidebar, select Customer accounts. You'll be redirected to the Customer accounts page.
  4. Next to Identity provider, select Manage. You'll be redirected to the Identity provider page.

    Important

    In Shopify, using your own Identity Provider for customer login is only available to stores on the Shopify Plus plan.

  5. Select Connect to provider. You'll be redirected to the Connect to identity provider page.
  6. Fill in the required fields. Paste the Discovery URL, Client ID, and Client Secret that you previously copied from Clerk Dashboard.
  7. In the Additional scopes field, enter profile.
  8. In the Post-logout redirect URI parameter name field, enter returnTo.
  9. Select Save at the top of the page to update your Identity Provider's configuration.
  10. In the top right, select Activate to enable your new Identity Provider.
  11. Under Setup configurations, copy and save the Callback URL somewhere secure.
  12. Navigate back to the Clerk Dashboard and paste the Callback URL into the Redirect URIs field.
  13. Select Save to update your Clerk OAuth application's configuration.

Feedback

What did you think of this content?

Last updated on