omniauth-facebook 1.5.0 → 1.5.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
  SHA1:
3
- metadata.gz: 46abf3346f9a25423f118274047a991a28ab862a
4
- data.tar.gz: 07620c5fefec062bb3461e4e951fcafc6d709470
3
+ metadata.gz: 6df31b397c5361d54234d354ee57e9b04ee60d47
4
+ data.tar.gz: a7ab41bed0a9fa303660f05e8982e71bca05f31e
5
5
  SHA512:
6
- metadata.gz: c5b3352257919a6b885277811d3ce1970fe2211bb7c547a5edf511bceb3a4b46547b0c8a82dd30f5cf9534fec43dd5e7c0f43474bd63c38ae1e829ff2bd6dfff
7
- data.tar.gz: 586ae998f9478c48dd45afd39755008e7f8577ccbc5dc21b142e06ae63ca2af499c89f8faf737b279178819707b0af51e779d6bd441b39bb6d787c98e7a72a63
6
+ metadata.gz: 964b27002810318b96b5bc82d44ed4ee8fcff75783711e32ddabd939521474c5bed352932a8ae10d5e5382e7c66a45dd04bf0125a3bba710f6e6292b7cd26375
7
+ data.tar.gz: cd32aa970b991a00984d1fd8b2ec730b56682872d64550bb2f6da7c9c4e44b0d8683b3eb60282bb52d34cf1bc7b71ee36b15fb1892ad72aaa4d8d6115856c7fe
@@ -87,15 +87,10 @@ class App < Sinatra::Base
87
87
  # signed_request FB sends us, asking for auth if the user has
88
88
  # not already granted access, or simply moving straight to the
89
89
  # callback where they have already granted access.
90
- #
91
- # we pass the state parameter which we can detect in our callback
92
- # to do custom rendering/redirection for the canvas app page
93
- redirect "/auth/facebook?signed_request=#{request.params['signed_request']}&state=canvas"
90
+ redirect "/auth/facebook?signed_request=#{request.params['signed_request']}"
94
91
  end
95
92
 
96
93
  get '/auth/:provider/callback' do
97
- # we can do something special here is +state+ param is canvas
98
- # (see notes above in /canvas/ method for more details)
99
94
  content_type 'application/json'
100
95
  MultiJson.encode(request.env)
101
96
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Facebook
3
- VERSION = "1.5.0"
3
+ VERSION = "1.5.1"
4
4
  end
5
5
  end
@@ -57,12 +57,7 @@ module OmniAuth
57
57
  end
58
58
 
59
59
  def build_access_token
60
- if access_token = request.params["access_token"]
61
- ::OAuth2::AccessToken.from_hash(
62
- client,
63
- {"access_token" => access_token}.update(access_token_options)
64
- )
65
- elsif signed_request_contains_access_token?
60
+ if signed_request_contains_access_token?
66
61
  hash = signed_request.clone
67
62
  ::OAuth2::AccessToken.new(
68
63
  client,
@@ -81,7 +76,6 @@ module OmniAuth
81
76
  # if we already have an access token, we can just hit the
82
77
  # callback URL directly and pass the signed request along
83
78
  params = { :signed_request => raw_signed_request }
84
- params[:state] = request.params['state'] if request.params['state']
85
79
  query = Rack::Utils.build_query(params)
86
80
 
87
81
  url = callback_url
@@ -116,7 +110,7 @@ module OmniAuth
116
110
  # you need to set them dynamically. You can also set these options
117
111
  # in the OmniAuth config :authorize_params option.
118
112
  #
119
- # /auth/facebook?display=popup&state=ABC
113
+ # /auth/facebook?display=popup
120
114
  #
121
115
  def authorize_params
122
116
  super.tap do |params|
@@ -469,20 +469,4 @@ module BuildAccessTokenTests
469
469
  assert_equal @payload['expires'], result.expires_at
470
470
  end
471
471
  end
472
-
473
- class ParamsContainAccessTokenStringTest < TestCase
474
- def setup
475
- super
476
-
477
- @request.stubs(:params).returns({'access_token' => 'm4c0d3z'})
478
-
479
- strategy.stubs(:callback_url).returns('/')
480
- end
481
-
482
- test 'returns a new access token' do
483
- result = strategy.build_access_token
484
- assert_kind_of ::OAuth2::AccessToken, result
485
- assert_equal 'm4c0d3z', result.token
486
- end
487
- end
488
472
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-facebook
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Dodwell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-13 00:00:00.000000000 Z
11
+ date: 2013-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2