shopify_app 22.3.0 → 22.3.1

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: 46bfbed5702afb3db0446577b3846c68c54b51e3453dd1569f0ad0eb727554c8
4
- data.tar.gz: 1171f8c433863622ca5c73742c258e02cc59fba3840edcdef1c4002223171bd4
3
+ metadata.gz: 2b4b936b4f5a91a7a73e53ec4e1df8d46d7cd75a67663ade6035524a32b01642
4
+ data.tar.gz: b9b5b3b9cc461fdee3d9b6447f888e68ed2bcd7e504084550118d2c9929e5072
5
5
  SHA512:
6
- metadata.gz: 59f3a11a7789c4c9bca786cb8ec99b59ed085529b649d4269b439e98c975e5cff97faef3f0b139d10a472b4142d513eba2a3859908cac37a5d9b354996f380ed
7
- data.tar.gz: 44ca61a7b14e1ad309bd24afec9d344592b7d399d44c83961e89687ed9557666c4e6f0e65e57268d8dfd178664266757815135cc5b37f5f95abc6814222a0e55
6
+ metadata.gz: 5c0c813ac266810468a1100dfa7c9baf1af7c889f9a9dc865d796c19baea2d0bcaea7c8f79f6f27e1cbb7fa918f237563eac954735d4dcd77e6aa9f89038b34c
7
+ data.tar.gz: fe5fdd935be6cf251ab74ecc110178c3a5a07cfdf5aafc7a568db34fea7568bbca218c99c8223d18555079cdc080bd96ba951c4f800937acb94809e3ae89ca0f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Unreleased
2
2
  ----------
3
3
 
4
+ 22.3.1 (July 26, 2024)
5
+ ----------
6
+ - Handle edge case where we attempted to redirect to login when already at the top level [#1887](https://github.com/Shopify/shopify_app/pull/1887)
7
+
4
8
  22.3.0 (July 24, 2024)
5
9
  ----------
6
10
  - Deprecate `ShopifyApp::JWTMiddleware`. And remove internal usage. Any existing app code relying on decoded JWT contents set from `request.env` should instead include the `WithShopifyIdToken` concern and call its respective methods. [#1861](https://github.com/Shopify/shopify_app/pull/1861) [Migration Guide](/docs/Upgrading.md#v2300---removed-shopifyappjwtmiddleware)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify_app (22.3.0)
4
+ shopify_app (22.3.1)
5
5
  activeresource
6
6
  addressable (~> 2.7)
7
7
  jwt (>= 2.2.3)
@@ -6,8 +6,13 @@
6
6
  <base target="_top">
7
7
  <title>Redirecting…</title>
8
8
 
9
+ <%
10
+ is_iframe = local_assigns.key?(:is_iframe) ? is_iframe : true
11
+ if is_iframe
12
+ %>
9
13
  <meta name="shopify-api-key" content="<%= ShopifyApp.configuration.api_key %>">
10
14
  <%= javascript_include_tag "https://cdn.shopify.com/shopifycloud/app-bridge.js" %>
15
+ <% end %>
11
16
 
12
17
  <%= javascript_include_tag('shopify_app/redirect', crossorigin: 'anonymous', integrity: true) %>
13
18
  </head>
@@ -204,7 +204,7 @@ module ShopifyApp
204
204
  render(
205
205
  "shopify_app/shared/redirect",
206
206
  layout: false,
207
- locals: { url: url, current_shopify_domain: current_shopify_domain },
207
+ locals: { url: url, current_shopify_domain: current_shopify_domain, is_iframe: embedded? },
208
208
  )
209
209
  else
210
210
  redirect_to(url)
@@ -33,5 +33,9 @@ module ShopifyApp
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ def embedded?
38
+ params[:embedded] == "1" || request.env["HTTP_SEC_FETCH_DEST"] == "iframe"
39
+ end
36
40
  end
37
41
  end
@@ -94,10 +94,6 @@ module ShopifyApp
94
94
  )
95
95
  end
96
96
 
97
- def embedded?
98
- params[:embedded] == "1" || request.env["HTTP_SEC_FETCH_DEST"] == "iframe"
99
- end
100
-
101
97
  def online_token_configured?
102
98
  ShopifyApp.configuration.online_token_configured?
103
99
  end
@@ -108,7 +104,7 @@ module ShopifyApp
108
104
  render(
109
105
  "shopify_app/shared/redirect",
110
106
  layout: false,
111
- locals: { url: url, current_shopify_domain: current_shopify_domain },
107
+ locals: { url: url, current_shopify_domain: current_shopify_domain, is_iframe: embedded? },
112
108
  )
113
109
  end
114
110
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ShopifyApp
4
- VERSION = "22.3.0"
4
+ VERSION = "22.3.1"
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "22.3.0",
3
+ "version": "22.3.1",
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: 22.3.0
4
+ version: 22.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-24 00:00:00.000000000 Z
11
+ date: 2024-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource