omniauth-shopify-oauth2 1.1.7 → 1.1.8

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
  SHA1:
3
- metadata.gz: a02eba969770fd2d0d1082fa3fef64b5723c3613
4
- data.tar.gz: 5a3141c9fd59de54d70a8a0618a00df64ee6834c
3
+ metadata.gz: 306d7810c126a0e99bf80f437726d22576178cab
4
+ data.tar.gz: 5ba33d8271dfcf92f542e04e7a8ddafcfc0e49e1
5
5
  SHA512:
6
- metadata.gz: af7d3a264f1984e7aa0e6299b7bbf54d865bf4b34efd024020cfad9c6b315a059b78af5d413774d0f61339c5c15605ef49090375f5c4a7213a655efedb0581ed
7
- data.tar.gz: e3203871bbeff6537bc4a775f7f359be38a1a7f4c5468ac58d0b1707492fa846f0b332455e72ac7ec42490e1f43b18d1b95ace3925bd16a0892b8d68bc5a9228
6
+ metadata.gz: 89a3cb9ea64f06a33e623fbd9368dd77ebaf2d5284cceef17cfeb68c54e8bf464ae72170e053c562d52a353a17b95574806d8361478896129d431e7a617befe9
7
+ data.tar.gz: 54919d9f8729c51df48175dff1d2881b58c775fc97402fef5ad7d69c94e29851f2a3c99f91b0701a563e3741517f79c8f36f81d35d51f6122505bcfe214d0d23
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -52,6 +52,7 @@ Here's an example *Authentication Hash* available in `request.env['omniauth.auth
52
52
  ```ruby
53
53
  {
54
54
  :provider => 'shopify',
55
+ :uid => 'example.myshopify.com',
55
56
  :credentials => {
56
57
  :token => 'afasd923kjh0934kf', # OAuth 2.0 access_token, which you store and use to authenticate API requests
57
58
  }
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org/'
2
2
 
3
3
  gem 'rack'
4
4
 
@@ -13,6 +13,7 @@ class App < Sinatra::Base
13
13
  </head>
14
14
  <body>
15
15
  <h3>Authorized</h3>
16
+ <p>Shop: #{request.env['omniauth.auth'].uid}</p>
16
17
  <p>Token: #{request.env['omniauth.auth']['credentials']['token']}</p>
17
18
  </body>
18
19
  </html>
@@ -34,7 +35,7 @@ class App < Sinatra::Base
34
35
  end
35
36
  end
36
37
 
37
- use Rack::Session::Cookie
38
+ use Rack::Session::Cookie, secret: SecureRandom.hex(64)
38
39
 
39
40
  use OmniAuth::Builder do
40
41
  provider :shopify, ENV['SHOPIFY_API_KEY'], ENV['SHOPIFY_SHARED_SECRET'],
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Shopify
3
- VERSION = "1.1.7"
3
+ VERSION = "1.1.8"
4
4
  end
5
5
  end
@@ -40,6 +40,14 @@ module OmniAuth
40
40
  end
41
41
  end
42
42
 
43
+ def callback_phase
44
+ if valid_site?
45
+ super
46
+ else
47
+ fail!(:invalid_site)
48
+ end
49
+ end
50
+
43
51
  def authorize_params
44
52
  super.tap do |params|
45
53
  params[:scope] ||= DEFAULT_SCOPE
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-shopify-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Odorcic
@@ -30,7 +30,7 @@ cert_chain:
30
30
  fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
31
31
  TConQSX2BnZdhIEYW+cKzEC/bLc=
32
32
  -----END CERTIFICATE-----
33
- date: 2014-06-25 00:00:00.000000000 Z
33
+ date: 2015-05-12 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: omniauth-oauth2
metadata.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- v
2
- �╇�<��e��#�I�Ī{�q�=���&�Cf�Gg�Z�<��&��>��捽��� �k���j�"���#C�A^BlAU�̵ $��o���?�M�?����x�S5�"�1CR;�^���D���i�yt��V���<�>ތ�RY�{%���M���[�j]�Ih��ɓ�U��Ҁ�L����֒���'�Y[ï. �h���[�+!�}pQ��8�po��*B�oe�6�8���K� �.@B���P
1
+ ���w�`&k�b)5���x���I`?3�7������cR?4n��N��1�����I��)PYt3D* V���g ����wb,���yLSh?�2�W�� %%aD�9���Y�� �PKk�e
2
+ ��������m-4LDVI����
3
+ ��V.�ЫD�iX�]���5y�k� �ldY((�=qA�x�����ȐB�'��s���~:����j�q�N Y��� &�n aD?�|��m+��6�F�<-�@Wz�f����˒��;��Qc