Search code examples
ruby-on-rails-3shopify-app

Shopify: Add scope without interrupting existing App users


I have a Shopify App that deals with products and shipping. The current scope is:

scope = ["read_shipping", "write_shipping", "read_products"]

New functionality needs new scope as:

scope = ["read_shipping", "write_shipping", "read_products",
  "write_products", "read_inventory", "write_inventory",
  "read_fulfillments", "write_fulfillments", "read_price_rules",
  "write_price_rules"]

For new App users everything is fine. How do I introduce this new scope to existing App users by:

  • Requesting App users to accept the new scope permissions
  • Not interrupting existing functionality for App users who never end up accepting new scope permissions

Solution

  • You add the new scopes you need to your App. Whenever ANYONE re-authenticates they will be prompted by Shopify to accept the new scopes. That is the only way to do it. No you cannot sneak in new scopes with existing installs, hoping they will just get the new scopes without them knowing about it.