OAuth overview
This guide introduces the OAuth flow for public apps and custom apps that are created in the Partner Dashboard.
Introduction to OAuth
Anchor link to section titled "Introduction to OAuth"OAuth 2.0 is the industry-standard protocol for authorizing or giving permissions to apps. This differs from authentication, which is the process of verifying the identity of the user or the app. The following video illustrates how OAuth works in Shopify:
The OAuth flow
Anchor link to section titled "The OAuth flow"Shopify uses OAuth 2.0’s authorization code grant flow to issue access tokens on behalf of users. The OAuth flow is used so that merchants can authorize Shopify apps to access data in a store. For example, an app might be authorized to access orders and product data in a store.
The following diagram illustrates the OAuth flow based on the actions of the merchant, your app, and Shopify:
The merchant makes a request to install the app.
The app redirects to Shopify to load the OAuth grant screen and requests the merchant to authorize the required scopes.
The merchant authorizes the app by consenting to the requested scopes.
The app receives an authorization grant. This is a temporary credential representing the authorization.
The app requests an access token by authenticating with Shopify and presenting the authorization grant.
Shopify authenticates the app, validates the authorization grant, and then issues and returns an access token. The app can now request data from Shopify.
The app uses the access token to make requests to the Shopify API.
Shopify validates the access token and returns the requested data.
- Authorize a public app or a custom app that was created in the Partner Dashboard using OAuth.