diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..485d476 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,23 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' + stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + days-before-stale: 30 + days-before-close: 5 + exempt-pr-label: 'pinned' + exempt-issue-label: 'pinned' diff --git a/.travis.yml b/.travis.yml index e863e12..b2552e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,6 @@ -before_install: - - gem update bundler - - bundle --version - - gem update --system - - gem --version +language: ruby +cache: bundler rvm: - - 2.3.0 - - 2.2 - - 2.1 - - 2.0 - - 1.9.3 - - jruby-19mode - - rbx-2 + - 2.7 + - 2.6 + - 2.5 diff --git a/CHANGELOG.md b/CHANGELOG.md index cb0ad8a..b3e5a2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,28 @@ +## 8.0.0 (2020-10-20) + +Changes: + + - user profile picture link includes access token (#344, @anklos) + +## 7.0.0 (2020-08-03) + +Changes: + + - bumped version of FB Graph API to v4.0 + +## 6.0.0 (2020-01-27) + +Changes: + + - bumped version of FB Graph API to v3.0 + +## 5.0.0 (2018-03-29) + +Changes: + + - bumped version of FB Graph API to v2.10 (#297, @piotrjaworski) + - use only CRuby 2.0+ on CI (#298, @simi) + ## 4.0.0 (2016-07-26) Changes: @@ -6,7 +31,7 @@ - switch to versioned FB APIs, currently using v2.6 (#245, @printercu, @mkdynamic) - remove deprecated :nickname field from README example (#223, @abelorian) - add Ruby 2.2 + 2.3.0 to CI (#225, @tricknotes, @mkdynamic, @anoraak) - - update example app (@mkynamic) + - update example app (@mkdynamic) ## 3.0.0 (2015-10-26) diff --git a/Gemfile b/Gemfile index 2fc94e1..d1172e4 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,8 @@ gemspec +gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '>= 2.0' + platforms :rbx do gem 'rubysl', '~> 2.0' end diff --git a/README.md b/README.md index b0615ed..91576cd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# OmniAuth Facebook  [![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) +# OmniAuth Facebook  [![Build Status](https://secure.travis-ci.org/simi/omniauth-facebook.svg?branch=master)](https://travis-ci.org/simi/omniauth-facebook) [![Gem Version](https://img.shields.io/gem/v/omniauth-facebook.svg)](https://rubygems.org/gems/omniauth-facebook) + +📣 **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! 📣 **These notes are based on master, please see tags for README pertaining to specific releases.** @@ -24,11 +26,11 @@ ```ruby Rails.application.config.middleware.use OmniAuth::Builder do - provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'] + provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'] end ``` -[See the example Sinatra app for full examples](https://github.com/mkdynamic/omniauth-facebook/blob/master/example/config.ru) of both the server and client-side flows (including using the Facebook Javascript SDK). +[See the example Sinatra app for full examples](https://github.com/simi/omniauth-facebook/blob/master/example/config.ru) of both the server and client-side flows (including using the Facebook Javascript SDK). ## Configuring @@ -39,7 +41,7 @@ `scope` | `email` | A comma-separated list of permissions you want to request from the user. See the Facebook docs for a full list of available permissions: https://developers.facebook.com/docs/reference/login/ `display` | `page` | The display context to show the authentication page. Options are: `page`, `popup` and `touch`. Read the Facebook docs for more details: https://developers.facebook.com/docs/reference/dialogs/oauth/ `image_size` | `square` | Set the size for the returned image url in the auth hash. Valid options include `square` (50x50), `small` (50 pixels wide, variable height), `normal` (100 pixels wide, variable height), or `large` (about 200 pixels wide, variable height). Additionally, you can request a picture of a specific size by setting this option to a hash with `:width` and `:height` as keys. This will return an available profile picture closest to the requested size and requested aspect ratio. If only `:width` or `:height` is specified, we will return a picture whose width or height is closest to the requested size, respectively. -`info_fields` | 'name,email' | Specify exactly which fields should be returned when getting the user's info. Value should be a comma-separated string as per https://developers.facebook.com/docs/graph-api/reference/user/ (only `/me` endpoint). +`info_fields` | `name,email` | Specify exactly which fields should be returned when getting the user's info. Value should be a comma-separated string as per https://developers.facebook.com/docs/graph-api/reference/user/ (only `/me` endpoint). `locale` | | Specify locale which should be used when getting the user's info. Value should be locale string as per https://developers.facebook.com/docs/reference/api/locale/. `auth_type` | | Optionally specifies the requested authentication features as a comma-separated list, as per https://developers.facebook.com/docs/facebook-login/reauthentication/. Valid values are `https` (checks for the presence of the secure cookie and asks for re-authentication if it is not present), and `reauthenticate` (asks the user to re-authenticate unconditionally). Use 'rerequest' when you want to request premissions. Default is `nil`. `secure_image_url` | `false` | Set to `true` to use https for the avatar image url returned in the auth hash. @@ -49,21 +51,21 @@ ```ruby Rails.application.config.middleware.use OmniAuth::Builder do - provider :facebook, ENV['APP_ID'], ENV['APP_SECRET'], + provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'], scope: 'email,user_birthday,read_stream', display: 'popup' end ``` ### API Version -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): +OmniAuth Facebook uses versioned API endpoints by default (current v4.0). 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 v7.0 (assuming that exists): ```ruby use OmniAuth::Builder do - provider :facebook, ENV['APP_ID'], ENV['APP_SECRET'], + provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'], client_options: { - site: 'https://graph.facebook.com/v3.0', - authorize_url: "https://www.facebook.com/v3.0/dialog/oauth" + site: 'https://graph.facebook.com/v7.0', + authorize_url: "https://www.facebook.com/v7.0/dialog/oauth" } end ``` @@ -86,8 +88,6 @@ first_name: 'Joe', last_name: 'Bloggs', image: 'http://graph.facebook.com/1234567/picture?type=square', - urls: { Facebook: 'http://www.facebook.com/jbloggs' }, - location: 'Palo Alto, California', verified: true }, credentials: { @@ -152,9 +152,7 @@ ## Supported Rubies -- Ruby MRI (1.9.3+) -- JRuby (1.9 mode) -- RBX (2.1.1+) +- Ruby MRI (2.3, 2.4, 2.5, 2.6) ## License diff --git a/debian/changelog b/debian/changelog index 618869a..339849d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ruby-omniauth-facebook (4.0.0-3) UNRELEASED; urgency=medium +ruby-omniauth-facebook (8.0.0-1) UNRELEASED; urgency=medium [ Utkarsh Gupta ] * Add salsa-ci.yml @@ -13,8 +13,9 @@ Repository-Browse. * Update Vcs-* headers from URL redirect. * Use canonical URL in Vcs-Git. + * New upstream release. - -- Utkarsh Gupta Tue, 13 Aug 2019 06:15:37 +0530 + -- Utkarsh Gupta Thu, 27 May 2021 20:52:24 -0000 ruby-omniauth-facebook (4.0.0-2) unstable; urgency=medium diff --git a/example/Gemfile.lock b/example/Gemfile.lock index aea783c..ef5921f 100644 --- a/example/Gemfile.lock +++ b/example/Gemfile.lock @@ -1,54 +1,57 @@ PATH - remote: ../ + remote: .. specs: - omniauth-facebook (3.0.0) + omniauth-facebook (6.0.0) omniauth-oauth2 (~> 1.2) GEM remote: https://rubygems.org/ specs: - backports (3.6.8) - faraday (0.9.2) + backports (3.15.0) + faraday (1.0.0) multipart-post (>= 1.2, < 3) - hashie (3.4.4) - jwt (1.5.1) - multi_json (1.12.1) - multi_xml (0.5.5) - multipart-post (2.0.0) - oauth2 (1.1.0) - faraday (>= 0.8, < 0.10) - jwt (~> 1.0, < 1.5.2) + hashie (3.6.0) + jwt (2.2.1) + multi_json (1.14.1) + multi_xml (0.6.0) + multipart-post (2.1.1) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) + oauth2 (1.4.2) + faraday (>= 0.8, < 2.0) + jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - omniauth (1.3.1) - hashie (>= 1.2, < 4) - rack (>= 1.0, < 3) - omniauth-oauth2 (1.4.0) - oauth2 (~> 1.0) - omniauth (~> 1.2) - rack (1.6.4) - rack-protection (1.5.3) + omniauth (1.9.0) + hashie (>= 3.4.6, < 3.7.0) + rack (>= 1.6.2, < 3) + omniauth-oauth2 (1.6.0) + oauth2 (~> 1.1) + omniauth (~> 1.9) + rack (2.1.1) + rack-protection (2.0.8.1) rack - rack-test (0.6.3) - rack (>= 1.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - sinatra-contrib (1.4.7) - backports (>= 2.0) + ruby2_keywords (0.0.2) + sinatra (2.0.8.1) + mustermann (~> 1.0) + rack (~> 2.0) + rack-protection (= 2.0.8.1) + tilt (~> 2.0) + sinatra-contrib (2.0.8.1) + backports (>= 2.8.2) multi_json - rack-protection - rack-test - sinatra (~> 1.4.0) - tilt (>= 1.3, < 3) + mustermann (~> 1.0) + rack-protection (= 2.0.8.1) + sinatra (= 2.0.8.1) + tilt (~> 2.0) sinatra-reloader (1.0) sinatra-contrib - tilt (2.0.5) + tilt (2.0.10) PLATFORMS ruby + x64-mingw32 DEPENDENCIES omniauth-facebook! @@ -56,4 +59,4 @@ sinatra-reloader BUNDLED WITH - 1.12.5 + 1.17.2 diff --git a/example/app.rb b/example/app.rb index 47d6514..a94f8a1 100644 --- a/example/app.rb +++ b/example/app.rb @@ -1,6 +1,7 @@ require 'sinatra' require "sinatra/reloader" require 'yaml' +require 'json' # configure sinatra set :run, false @@ -27,8 +28,8 @@