shopify_app 13.4.1 → 13.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b658d15c37ab3bf556566d5608a0b778a9f72448c4e8cdc6363c52e31dcf5ff5
4
- data.tar.gz: 42c4e4dd1377bbdbb8b627f5a56b81c58559133158f1d0c7cc212aff2e7da634
3
+ metadata.gz: 56264e18e59398228e56a0a26dc752989b527d7ce935f0375a872fd89c88b4b9
4
+ data.tar.gz: a9c8ff9c9828278f7fff6013a09ec6bf3ea8f4542c700c5fe57bf16e33ed1f68
5
5
  SHA512:
6
- metadata.gz: 9753dddbdda3d31395e154f640bc4043312b160c72140525c32f839b96498db1bfae024daab4027b1b003b7206a7ba47106338369240e9437ac060682e594290
7
- data.tar.gz: d5f6fb4fe5c753280b7c3d0d3f8b58b152ce395c19f6cc6131e63e90aa233e95abfbe2598b418d6828586462eb9e7cb48ab7bad0ccdeacc71b5445a83c6aa70e
6
+ metadata.gz: cbd3b18c84d6e69c01516f7b74927ba3d236cd17ad2d88a68cc1c93dfd1f8d20aa614507adf031625e088612001d71dbbb116bb267865b1924674d2a6f937e6f
7
+ data.tar.gz: 82b859132159cf85fb3af1607296b20aa040ca30515a6225fa3887ee938dd721f11be2939ea2d9179a448e80ae3d2e7316749bd237ee8344fa0cf1fe862d6a7b
@@ -1,3 +1,7 @@
1
+ 13.5.0
2
+ ------
3
+ * Add `signal_access_token_required` helper method for apps to indicate access token has expired and that a new one is required
4
+
1
5
  13.4.1
2
6
  ------
3
7
  * Fix the version checks for the dependency on `shopify_api` to allow all of v9.X
@@ -14,6 +14,8 @@ module ShopifyApp
14
14
  rescue_from ActiveResource::UnauthorizedAccess, with: :close_session
15
15
  end
16
16
 
17
+ ACCESS_TOKEN_REQUIRED_HEADER = 'X-Shopify-API-Request-Failure-Unauthorized'
18
+
17
19
  def activate_shopify_session
18
20
  return redirect_to_login if current_shopify_session.blank?
19
21
  clear_top_level_oauth_cookie
@@ -80,6 +82,10 @@ module ShopifyApp
80
82
  end
81
83
  end
82
84
 
85
+ def signal_access_token_required
86
+ response.set_header(ACCESS_TOKEN_REQUIRED_HEADER, true)
87
+ end
88
+
83
89
  protected
84
90
 
85
91
  def jwt_shopify_domain
@@ -204,6 +210,8 @@ module ShopifyApp
204
210
  def return_address
205
211
  return base_return_address unless ShopifyApp.configuration.allow_jwt_authentication
206
212
  return_address_with_params(shop: current_shopify_domain)
213
+ rescue ShopifyDomainNotFound
214
+ base_return_address
207
215
  end
208
216
 
209
217
  def base_return_address
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ShopifyApp
3
- VERSION = '13.4.1'
3
+ VERSION = '13.5.0'
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "13.4.1",
3
+ "version": "13.5.0",
4
4
  "repository": "git@github.com:Shopify/shopify_app.git",
5
5
  "author": "Shopify",
6
6
  "license": "MIT",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.4.1
4
+ version: 13.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-16 00:00:00.000000000 Z
11
+ date: 2020-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer