With your instance deployed, simply redirect users to:
https://YOUR_HANDSHAKE_INSTANCE_URL/auth/HANDLER_ID/redirect
Where HANDLER_ID
is either shopify
or the value passed to the optional id
argument of the Shopify()
factory. (See Usage below.)
Handshake will take the user through the Shopify OAuth flow and redirect them back to the URL specified by the callback_uri
query parameter.
You must include an
extras.shop
parameter to identify the shop that you're
trying to take through the OAuth flow.
The final URL might look something like this:
Modify your app/options.ts
file to include the Shopify()
handler like so:
Consult the reference to learn about HandshakeOptions
.
The
clientId
and
clientSecret
arguments to the
Shopify()
handler come
from your Shopify app.
You must have a Shopify app to take users through the OAuth flow. Check out this in-depth tutorial on how authentication works in the Shopify ecosystem.
Within your app, you'll find the client ID and secret:
Find client ID and secret in the admin of your Shopify app.
Make sure your Handshake URL is allowed within your Shopify app's Configuration tab:
Follow the format:
https://HANDSHAKE_URL/auth/shopify/callback
If you see this, the Handshake callback URL you asked Shopify to send users back to wasn't added to the list of allowed URLs in your Shopify app settings.
Shopify error page saying "The redirect_uri is not whitelisted"
–
Having an issue not included here? Open an issue in our Github repo to get help from our team.