shopify.auth

January 26, 2024 ยท View on GitHub

This object contains functions used to authenticate apps, and redirect users to Shopify.

Token Exchange

Learn more about token exchange.

PropertyDescription
tokenExchangePerforms token exchange to get access token from session token

Authorization Code Grant Flow

Learn more about authorization code grant flow.

PropertyDescription
beginRedirect the user to Shopify to request authorization for the app.
callbackReceive Shopify's callback after the user approves the app installation.
nonceGenerates a random string of characters to be used as the state value for OAuth.

Utility Functions

PropertyDescription
safeCompareCompares two strings or arrays in a way that's safe against timing attacks.
getEmbeddedAppUrlBuilds a URL to redirect the user back to the right Shopify surface based on the current request.
buildEmbeddedAppUrlConstructs the appropriate Shopify URL to redirect to.

๐Ÿ”™ Back to shopifyApi