Book Image

Shopify Application Development

By : Michael Larkin
Book Image

Shopify Application Development

By: Michael Larkin

Overview of this book

Table of Contents (12 chapters)

Chapter 4. Going Public

In the previous chapter, we successfully turned our website into a functioning private application. In this chapter, we are going to update our code to make the app support multitenancy. This means that one instance of the app will be able to service multiple Shopify accounts simultaneously, instead of requiring each store to have its own copy of the app. An example of this is the difference between a site such as Facebook (multitenant) and a program such as Microsoft Word (single tenant). Everyone logs in to the same Facebook app, but each computer needs its own copy of Word. The multitenant model should be familiar to you as most websites you use operate in this manner.

To support multiple shops, we will need to acquire and store each shop's API password in a secure manner. Each password will be different, so we'll use them in place of the private ones that we generated earlier.

Fortunately for us, Shopify already has a process in place to securely acquire the API...