omniauth-facebook 4.0.0 β 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -4
- data/CHANGELOG.md +8 -1
- data/Gemfile +2 -0
- data/README.md +4 -6
- data/example/app.rb +1 -1
- data/lib/omniauth/facebook/version.rb +1 -1
- data/lib/omniauth/strategies/facebook.rb +2 -2
- data/test/strategy_test.rb +11 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da76a304fb3e8b0cd49caecd3f02747a3544968d
|
4
|
+
data.tar.gz: 5d7744963727532f958909cb64e27acd9af8dc53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9fbf94ede8391862455812645c341b54684d965cc9c45a2582979284a77359ff3245d254d893ae19b363dbd398e44ff8eb13d034ad2ac2fb4510c3062c7918
|
7
|
+
data.tar.gz: e5c6169e330cef9714dd4a629b6ae45a0396b090fcf22c6719982a308aea881028450e20493d66dbd52fd728c9f410d987745df05fab107e4706b2ad88cc575d
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 5.0.0 (2018-03-29)
|
2
|
+
|
3
|
+
Changes:
|
4
|
+
|
5
|
+
- bumped version of FB Graph API to v2.10 (#297, @piotrjaworski)
|
6
|
+
- use only CRuby 2.0+ on CI (#298, @simi)
|
7
|
+
|
1
8
|
## 4.0.0 (2016-07-26)
|
2
9
|
|
3
10
|
Changes:
|
@@ -6,7 +13,7 @@ Changes:
|
|
6
13
|
- switch to versioned FB APIs, currently using v2.6 (#245, @printercu, @mkdynamic)
|
7
14
|
- remove deprecated :nickname field from README example (#223, @abelorian)
|
8
15
|
- add Ruby 2.2 + 2.3.0 to CI (#225, @tricknotes, @mkdynamic, @anoraak)
|
9
|
-
- update example app (@
|
16
|
+
- update example app (@mkdynamic)
|
10
17
|
|
11
18
|
## 3.0.0 (2015-10-26)
|
12
19
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# OmniAuth Facebook [](https://travis-ci.org/mkdynamic/omniauth-facebook) [](https://rubygems.org/gems/omniauth-facebook)
|
2
2
|
|
3
|
+
π£ **NOTICE** Weβre looking for maintainers to help keep this project up-to-date. If you are interested in helping please open an Issue expressing your interest. Thanks! π£
|
4
|
+
|
3
5
|
**These notes are based on master, please see tags for README pertaining to specific releases.**
|
4
6
|
|
5
7
|
Facebook OAuth2 Strategy for OmniAuth.
|
@@ -56,7 +58,7 @@ end
|
|
56
58
|
|
57
59
|
### API Version
|
58
60
|
|
59
|
-
OmniAuth Facebook uses versioned API endpoints by default (current v2.
|
61
|
+
OmniAuth Facebook uses versioned API endpoints by default (current v2.10). You can configure a different version via `client_options` hash passed to `provider`, specifically you should change the version in the `site` and `authorize_url` parameters. For example, to change to v3.0 (assuming that exists):
|
60
62
|
|
61
63
|
```ruby
|
62
64
|
use OmniAuth::Builder do
|
@@ -86,8 +88,6 @@ Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
|
|
86
88
|
first_name: 'Joe',
|
87
89
|
last_name: 'Bloggs',
|
88
90
|
image: 'http://graph.facebook.com/1234567/picture?type=square',
|
89
|
-
urls: { Facebook: 'http://www.facebook.com/jbloggs' },
|
90
|
-
location: 'Palo Alto, California',
|
91
91
|
verified: true
|
92
92
|
},
|
93
93
|
credentials: {
|
@@ -152,9 +152,7 @@ If you use the server-side flow, Facebook will give you back a longer lived acce
|
|
152
152
|
|
153
153
|
## Supported Rubies
|
154
154
|
|
155
|
-
- Ruby MRI (
|
156
|
-
- JRuby (1.9 mode)
|
157
|
-
- RBX (2.1.1+)
|
155
|
+
- Ruby MRI (2.0+)
|
158
156
|
|
159
157
|
## License
|
160
158
|
|
data/example/app.rb
CHANGED
@@ -28,7 +28,7 @@ get '/client-side' do
|
|
28
28
|
window.fbAsyncInit = function() {
|
29
29
|
FB.init({
|
30
30
|
appId: '#{ENV['APP_ID']}',
|
31
|
-
version: 'v2.
|
31
|
+
version: 'v2.10',
|
32
32
|
cookie: true // IMPORTANT must enable cookies to allow the server to access the session
|
33
33
|
});
|
34
34
|
console.log("fb init");
|
@@ -12,8 +12,8 @@ module OmniAuth
|
|
12
12
|
DEFAULT_SCOPE = 'email'
|
13
13
|
|
14
14
|
option :client_options, {
|
15
|
-
site: 'https://graph.facebook.com/v2.
|
16
|
-
authorize_url: "https://www.facebook.com/v2.
|
15
|
+
site: 'https://graph.facebook.com/v2.10',
|
16
|
+
authorize_url: "https://www.facebook.com/v2.10/dialog/oauth",
|
17
17
|
token_url: 'oauth/access_token'
|
18
18
|
}
|
19
19
|
|
data/test/strategy_test.rb
CHANGED
@@ -9,11 +9,11 @@ end
|
|
9
9
|
|
10
10
|
class ClientTest < StrategyTestCase
|
11
11
|
test 'has correct Facebook site' do
|
12
|
-
assert_equal 'https://graph.facebook.com/v2.
|
12
|
+
assert_equal 'https://graph.facebook.com/v2.10', strategy.client.site
|
13
13
|
end
|
14
14
|
|
15
15
|
test 'has correct authorize url' do
|
16
|
-
assert_equal 'https://www.facebook.com/v2.
|
16
|
+
assert_equal 'https://www.facebook.com/v2.10/dialog/oauth', strategy.client.options[:authorize_url]
|
17
17
|
end
|
18
18
|
|
19
19
|
test 'has correct token url with versioning' do
|
@@ -99,7 +99,7 @@ class InfoTest < StrategyTestCase
|
|
99
99
|
@options = { secure_image_url: true }
|
100
100
|
raw_info = { 'name' => 'Fred Smith', 'id' => '321' }
|
101
101
|
strategy.stubs(:raw_info).returns(raw_info)
|
102
|
-
assert_equal 'https://graph.facebook.com/v2.
|
102
|
+
assert_equal 'https://graph.facebook.com/v2.10/321/picture', strategy.info['image']
|
103
103
|
end
|
104
104
|
|
105
105
|
test 'returns the image_url based of the client site' do
|
@@ -113,14 +113,14 @@ class InfoTest < StrategyTestCase
|
|
113
113
|
@options = { image_size: 'normal' }
|
114
114
|
raw_info = { 'name' => 'Fred Smith', 'id' => '321' }
|
115
115
|
strategy.stubs(:raw_info).returns(raw_info)
|
116
|
-
assert_equal 'http://graph.facebook.com/v2.
|
116
|
+
assert_equal 'http://graph.facebook.com/v2.10/321/picture?type=normal', strategy.info['image']
|
117
117
|
end
|
118
118
|
|
119
119
|
test 'returns the image with size specified as a symbol in the `image_size` option' do
|
120
120
|
@options = { image_size: :normal }
|
121
121
|
raw_info = { 'name' => 'Fred Smith', 'id' => '321' }
|
122
122
|
strategy.stubs(:raw_info).returns(raw_info)
|
123
|
-
assert_equal 'http://graph.facebook.com/v2.
|
123
|
+
assert_equal 'http://graph.facebook.com/v2.10/321/picture?type=normal', strategy.info['image']
|
124
124
|
end
|
125
125
|
|
126
126
|
test 'returns the image with width and height specified in the `image_size` option' do
|
@@ -129,7 +129,7 @@ class InfoTest < StrategyTestCase
|
|
129
129
|
strategy.stubs(:raw_info).returns(raw_info)
|
130
130
|
assert_match 'width=123', strategy.info['image']
|
131
131
|
assert_match 'height=987', strategy.info['image']
|
132
|
-
assert_match 'http://graph.facebook.com/v2.
|
132
|
+
assert_match 'http://graph.facebook.com/v2.10/321/picture?', strategy.info['image']
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
@@ -176,7 +176,7 @@ class InfoTestOptionalDataPresent < StrategyTestCase
|
|
176
176
|
|
177
177
|
test 'returns the facebook avatar url' do
|
178
178
|
@raw_info['id'] = '321'
|
179
|
-
assert_equal 'http://graph.facebook.com/v2.
|
179
|
+
assert_equal 'http://graph.facebook.com/v2.10/321/picture', strategy.info['image']
|
180
180
|
end
|
181
181
|
|
182
182
|
test 'returns the Facebook link as the Facebook url' do
|
@@ -258,7 +258,7 @@ class RawInfoTest < StrategyTestCase
|
|
258
258
|
@options = {appsecret_proof: @appsecret_proof, fields: 'name,email'}
|
259
259
|
end
|
260
260
|
|
261
|
-
test 'performs a GET to https://graph.facebook.com/v2.
|
261
|
+
test 'performs a GET to https://graph.facebook.com/v2.10/me' do
|
262
262
|
strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
|
263
263
|
strategy.stubs(:access_token).returns(@access_token)
|
264
264
|
params = {params: @options}
|
@@ -266,7 +266,7 @@ class RawInfoTest < StrategyTestCase
|
|
266
266
|
strategy.raw_info
|
267
267
|
end
|
268
268
|
|
269
|
-
test 'performs a GET to https://graph.facebook.com/v2.
|
269
|
+
test 'performs a GET to https://graph.facebook.com/v2.10/me with locale' do
|
270
270
|
@options.merge!({ locale: 'cs_CZ' })
|
271
271
|
strategy.stubs(:access_token).returns(@access_token)
|
272
272
|
strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
|
@@ -275,7 +275,7 @@ class RawInfoTest < StrategyTestCase
|
|
275
275
|
strategy.raw_info
|
276
276
|
end
|
277
277
|
|
278
|
-
test 'performs a GET to https://graph.facebook.com/v2.
|
278
|
+
test 'performs a GET to https://graph.facebook.com/v2.10/me with info_fields' do
|
279
279
|
@options.merge!({info_fields: 'about'})
|
280
280
|
strategy.stubs(:access_token).returns(@access_token)
|
281
281
|
strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
|
@@ -284,7 +284,7 @@ class RawInfoTest < StrategyTestCase
|
|
284
284
|
strategy.raw_info
|
285
285
|
end
|
286
286
|
|
287
|
-
test 'performs a GET to https://graph.facebook.com/v2.
|
287
|
+
test 'performs a GET to https://graph.facebook.com/v2.10/me with default info_fields' do
|
288
288
|
strategy.stubs(:access_token).returns(@access_token)
|
289
289
|
strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
|
290
290
|
params = {params: {appsecret_proof: @appsecret_proof, fields: 'name,email'}}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-facebook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Dodwell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth-oauth2
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.5.2.1
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Facebook OAuth2 Strategy for OmniAuth
|