Package list ruby-omniauth-facebook / bc95a7f
[ Utkarsh Gupta ] [ Debian Janitor ] New upstream snapshot. Debian Janitor 2 years ago
10 changed file(s) with 44 addition(s) and 36 deletion(s). Raw diff Collapse all Expand all
33 - gem update --system
44 - gem --version
55 rvm:
6 - 2.3.0
7 - 2.2
8 - 2.1
9 - 2.0
10 - 1.9.3
11 - jruby-19mode
12 - rbx-2
6 - 2.6
7 - 2.5
8 - 2.4
9 - 2.3
0 ## 5.0.0 (2018-03-29)
1
2 Changes:
3
4 - bumped version of FB Graph API to v2.10 (#297, @piotrjaworski)
5 - use only CRuby 2.0+ on CI (#298, @simi)
6
07 ## 4.0.0 (2016-07-26)
18
29 Changes:
512 - switch to versioned FB APIs, currently using v2.6 (#245, @printercu, @mkdynamic)
613 - remove deprecated :nickname field from README example (#223, @abelorian)
714 - add Ruby 2.2 + 2.3.0 to CI (#225, @tricknotes, @mkdynamic, @anoraak)
8 - update example app (@mkynamic)
15 - update example app (@mkdynamic)
916
1017 ## 3.0.0 (2015-10-26)
1118
11
22 gemspec
33
4 gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '>= 2.0'
5
46 platforms :rbx do
57 gem 'rubysl', '~> 2.0'
68 end
00 # OmniAuth Facebook &nbsp;[![Build Status](https://secure.travis-ci.org/mkdynamic/omniauth-facebook.svg?branch=master)](https://travis-ci.org/mkdynamic/omniauth-facebook) [![Gem Version](https://img.shields.io/gem/v/omniauth-facebook.svg)](https://rubygems.org/gems/omniauth-facebook)
1
2 📣 **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! 📣
13
24 **These notes are based on master, please see tags for README pertaining to specific releases.**
35
2325
2426 ```ruby
2527 Rails.application.config.middleware.use OmniAuth::Builder do
26 provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET']
28 provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET']
2729 end
2830 ```
2931
4850
4951 ```ruby
5052 Rails.application.config.middleware.use OmniAuth::Builder do
51 provider :facebook, ENV['APP_ID'], ENV['APP_SECRET'],
53 provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'],
5254 scope: 'email,user_birthday,read_stream', display: 'popup'
5355 end
5456 ```
5557
5658 ### API Version
5759
58 OmniAuth Facebook uses versioned API endpoints by default (current v2.6). 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 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):
5961
6062 ```ruby
6163 use OmniAuth::Builder do
62 provider :facebook, ENV['APP_ID'], ENV['APP_SECRET'],
64 provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'],
6365 client_options: {
6466 site: 'https://graph.facebook.com/v3.0',
6567 authorize_url: "https://www.facebook.com/v3.0/dialog/oauth"
8587 first_name: 'Joe',
8688 last_name: 'Bloggs',
8789 image: 'http://graph.facebook.com/1234567/picture?type=square',
88 urls: { Facebook: 'http://www.facebook.com/jbloggs' },
89 location: 'Palo Alto, California',
9090 verified: true
9191 },
9292 credentials: {
151151
152152 ## Supported Rubies
153153
154 - Ruby MRI (1.9.3+)
155 - JRuby (1.9 mode)
156 - RBX (2.1.1+)
154 - Ruby MRI (2.3, 2.4, 2.5, 2.6)
157155
158156 ## License
159157
0 ruby-omniauth-facebook (4.0.0-3) UNRELEASED; urgency=medium
0 ruby-omniauth-facebook (5.0.0+git20191017.2de8e13-1) UNRELEASED; urgency=medium
11
2 [ Utkarsh Gupta ]
23 * Add salsa-ci.yml
34
4 -- Utkarsh Gupta <guptautkarsh2102@gmail.com> Tue, 13 Aug 2019 06:15:37 +0530
5 [ Debian Janitor ]
6 * New upstream snapshot.
7
8 -- Debian Janitor <janitor@jelmer.uk> Fri, 18 Oct 2019 13:51:58 +0000
59
610 ruby-omniauth-facebook (4.0.0-2) unstable; urgency=medium
711
2626 <script type="text/javascript">
2727 window.fbAsyncInit = function() {
2828 FB.init({
29 appId: '#{ENV['APP_ID']}',
30 version: 'v2.6',
29 appId: '#{ENV['FACEBOOK_APP_ID']}',
30 version: 'v2.10',
3131 cookie: true // IMPORTANT must enable cookies to allow the server to access the session
3232 });
3333 console.log("fb init");
44 use Rack::Session::Cookie, secret: 'abc123'
55
66 use OmniAuth::Builder do
7 provider :facebook, ENV['APP_ID'], ENV['APP_SECRET']
7 provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET']
88 end
99
1010 run Sinatra::Application
00 module OmniAuth
11 module Facebook
2 VERSION = "4.0.0"
2 VERSION = '5.0.0'
33 end
44 end
1111 DEFAULT_SCOPE = 'email'
1212
1313 option :client_options, {
14 site: 'https://graph.facebook.com/v2.6',
15 authorize_url: "https://www.facebook.com/v2.6/dialog/oauth",
14 site: 'https://graph.facebook.com/v2.10',
15 authorize_url: "https://www.facebook.com/v2.10/dialog/oauth",
1616 token_url: 'oauth/access_token'
1717 }
1818
88
99 class ClientTest < StrategyTestCase
1010 test 'has correct Facebook site' do
11 assert_equal 'https://graph.facebook.com/v2.6', strategy.client.site
11 assert_equal 'https://graph.facebook.com/v2.10', strategy.client.site
1212 end
1313
1414 test 'has correct authorize url' do
15 assert_equal 'https://www.facebook.com/v2.6/dialog/oauth', strategy.client.options[:authorize_url]
15 assert_equal 'https://www.facebook.com/v2.10/dialog/oauth', strategy.client.options[:authorize_url]
1616 end
1717
1818 test 'has correct token url with versioning' do
9898 @options = { secure_image_url: true }
9999 raw_info = { 'name' => 'Fred Smith', 'id' => '321' }
100100 strategy.stubs(:raw_info).returns(raw_info)
101 assert_equal 'https://graph.facebook.com/v2.6/321/picture', strategy.info['image']
101 assert_equal 'https://graph.facebook.com/v2.10/321/picture', strategy.info['image']
102102 end
103103
104104 test 'returns the image_url based of the client site' do
112112 @options = { image_size: 'normal' }
113113 raw_info = { 'name' => 'Fred Smith', 'id' => '321' }
114114 strategy.stubs(:raw_info).returns(raw_info)
115 assert_equal 'http://graph.facebook.com/v2.6/321/picture?type=normal', strategy.info['image']
115 assert_equal 'http://graph.facebook.com/v2.10/321/picture?type=normal', strategy.info['image']
116116 end
117117
118118 test 'returns the image with size specified as a symbol in the `image_size` option' do
119119 @options = { image_size: :normal }
120120 raw_info = { 'name' => 'Fred Smith', 'id' => '321' }
121121 strategy.stubs(:raw_info).returns(raw_info)
122 assert_equal 'http://graph.facebook.com/v2.6/321/picture?type=normal', strategy.info['image']
122 assert_equal 'http://graph.facebook.com/v2.10/321/picture?type=normal', strategy.info['image']
123123 end
124124
125125 test 'returns the image with width and height specified in the `image_size` option' do
128128 strategy.stubs(:raw_info).returns(raw_info)
129129 assert_match 'width=123', strategy.info['image']
130130 assert_match 'height=987', strategy.info['image']
131 assert_match 'http://graph.facebook.com/v2.6/321/picture?', strategy.info['image']
131 assert_match 'http://graph.facebook.com/v2.10/321/picture?', strategy.info['image']
132132 end
133133 end
134134
175175
176176 test 'returns the facebook avatar url' do
177177 @raw_info['id'] = '321'
178 assert_equal 'http://graph.facebook.com/v2.6/321/picture', strategy.info['image']
178 assert_equal 'http://graph.facebook.com/v2.10/321/picture', strategy.info['image']
179179 end
180180
181181 test 'returns the Facebook link as the Facebook url' do
257257 @options = {appsecret_proof: @appsecret_proof, fields: 'name,email'}
258258 end
259259
260 test 'performs a GET to https://graph.facebook.com/v2.6/me' do
260 test 'performs a GET to https://graph.facebook.com/v2.10/me' do
261261 strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
262262 strategy.stubs(:access_token).returns(@access_token)
263263 params = {params: @options}
265265 strategy.raw_info
266266 end
267267
268 test 'performs a GET to https://graph.facebook.com/v2.6/me with locale' do
268 test 'performs a GET to https://graph.facebook.com/v2.10/me with locale' do
269269 @options.merge!({ locale: 'cs_CZ' })
270270 strategy.stubs(:access_token).returns(@access_token)
271271 strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
274274 strategy.raw_info
275275 end
276276
277 test 'performs a GET to https://graph.facebook.com/v2.6/me with info_fields' do
277 test 'performs a GET to https://graph.facebook.com/v2.10/me with info_fields' do
278278 @options.merge!({info_fields: 'about'})
279279 strategy.stubs(:access_token).returns(@access_token)
280280 strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
283283 strategy.raw_info
284284 end
285285
286 test 'performs a GET to https://graph.facebook.com/v2.6/me with default info_fields' do
286 test 'performs a GET to https://graph.facebook.com/v2.10/me with default info_fields' do
287287 strategy.stubs(:access_token).returns(@access_token)
288288 strategy.stubs(:appsecret_proof).returns(@appsecret_proof)
289289 params = {params: {appsecret_proof: @appsecret_proof, fields: 'name,email'}}