This blog post explores how to perform Shopify online store authentication using JSON web tokens.
Shopify is a popular and useful platform for creating online stores. It’s quite extensible, but it has its own limitations. Despite those limitations, it is possible to use Shopify apps and themes to provide deep customization for Shopify users even with the more basic Shopify plans, with little more than an API server hosted on the platform of your choice.
We want to be able to offer customized experiences to customers through an external app, using any logic we desire. To do so, we need to be able to have an external service that can tell who a customer is in order to specify what they should see. There are many uses for this. We could have an app that accepts reviews, but only if the customer has purchased the product being reviewed. We could handle business rules that, for example, check an external system before giving a customer free shipping. We could have a forum that is only accessible to customers who have purchased so many items. The possibilities are endless.
Throughout this, I’ll explain how to do this from a high level, with specific code examples for a Node.js application server, but the principle can be used with anything that you can use to host an HTTP API server.
#shopify #jwt