Hello community,
here is the log from the commit of package rubygem-omniauth-google-oauth2 for
openSUSE:Factory checked in at 2019-01-21 10:25:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-omniauth-google-oauth2 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-omniauth-google-oauth2.new.28833
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-omniauth-google-oauth2"
Mon Jan 21 10:25:13 2019 rev:3 rq:656363 version:0.5.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-omniauth-google-oauth2/rubygem-omniauth-google-oauth2.changes
2018-02-16 21:43:38.793307316 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-omniauth-google-oauth2.new.28833/rubygem-omniauth-google-oauth2.changes
2019-01-21 10:25:15.081757360 +0100
@@ -1,0 +2,20 @@
+Sat Dec 8 16:26:57 UTC 2018 - Stephan Kulow <[email protected]>
+
+- updated to version 0.5.4
+ see installed CHANGELOG.md
+
+ ## 0.5.4 - 2018-12-07
+
+ ### Added
+ - New recommended endpoints for Google OAuth.
+
+ ### Deprecated
+ - Nothing.
+
+ ### Removed
+ - Nothing.
+
+ ### Fixed
+ - Nothing.
+
+-------------------------------------------------------------------
Old:
----
omniauth-google-oauth2-0.5.3.gem
New:
----
omniauth-google-oauth2-0.5.4.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-omniauth-google-oauth2.spec ++++++
--- /var/tmp/diff_new_pack.rukcjm/_old 2019-01-21 10:25:15.981756371 +0100
+++ /var/tmp/diff_new_pack.rukcjm/_new 2019-01-21 10:25:15.985756367 +0100
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -24,7 +24,7 @@
#
Name: rubygem-omniauth-google-oauth2
-Version: 0.5.3
+Version: 0.5.4
Release: 0
%define mod_name omniauth-google-oauth2
%define mod_full_name %{mod_name}-%{version}
++++++ omniauth-google-oauth2-0.5.3.gem -> omniauth-google-oauth2-0.5.4.gem
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 2018-01-26 08:47:26.000000000 +0100
+++ new/.travis.yml 2018-12-08 00:59:10.000000000 +0100
@@ -4,3 +4,4 @@
- '2.2.7'
- '2.3.4'
- '2.4.1'
+ - '2.5.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2018-01-26 08:47:26.000000000 +0100
+++ new/CHANGELOG.md 2018-12-08 00:59:10.000000000 +0100
@@ -1,6 +1,20 @@
# Changelog
All notable changes to this project will be documented in this file.
+## 0.5.4 - 2018-12-07
+
+### Added
+- New recommended endpoints for Google OAuth.
+
+### Deprecated
+- Nothing.
+
+### Removed
+- Nothing.
+
+### Fixed
+- Nothing.
+
## 0.5.3 - 2018-01-25
### Added
@@ -20,7 +34,7 @@
## 0.5.2 - 2017-07-30
### Added
-- Nothing
+- Nothing.
### Deprecated
- Nothing.
@@ -29,7 +43,7 @@
- New `authorize_url` and `token_url` endpoints are reverted until JWT 2.0
ships.
### Fixed
-- Nothing
+- Nothing.
## 0.5.1 - 2017-07-19
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2018-01-26 08:47:26.000000000 +0100
+++ new/README.md 2018-12-08 00:59:10.000000000 +0100
@@ -95,8 +95,7 @@
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'],
ENV['GOOGLE_CLIENT_SECRET'],
{
- name: 'google',
- scope: 'email, profile, plus.me, http://gdata.youtube.com',
+ scope: 'userinfo.email, userinfo.profile, plus.me,
http://gdata.youtube.com',
prompt: 'select_account',
image_aspect_ratio: 'square',
image_size: 50
@@ -168,6 +167,7 @@
```ruby
config.omniauth :google_oauth2, 'GOOGLE_CLIENT_ID', 'GOOGLE_CLIENT_SECRET', {}
```
+NOTE: If you are using this gem with devise with above snippet in
`config/initializers/devise.rb` then do not create
`config/initializers/omniauth.rb` which will conflict with devise
configurations.
Then add the following to 'config/routes.rb' so the callback routes are
defined.
@@ -303,7 +303,7 @@
Just set the `full_host` in OmniAuth based on the Rails.env.
```
-# config/initialisers/omniauth.rb
+# config/initializers/omniauth.rb
OmniAuth.config.full_host = Rails.env.production? ? 'https://domain.com' :
'http://localhost:3000'
```
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/examples/config.ru new/examples/config.ru
--- old/examples/config.ru 2018-01-26 08:47:26.000000000 +0100
+++ new/examples/config.ru 2018-12-08 00:59:10.000000000 +0100
@@ -21,63 +21,63 @@
class App < Sinatra::Base
get '/' do
<<-HTML
-<!DOCTYPE html>
-<html>
- <head>
- <title>Google OAuth2 Example</title>
- <script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- <script>
- jQuery(function() {
- return $.ajax({
- url: 'https://apis.google.com/js/client:plus.js?onload=gpAsyncInit',
- dataType: 'script',
- cache: true
- });
- });
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Google OAuth2 Example</title>
+ <script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
+ <script>
+ jQuery(function() {
+ return $.ajax({
+ url:
'https://apis.google.com/js/client:plus.js?onload=gpAsyncInit',
+ dataType: 'script',
+ cache: true
+ });
+ });
- window.gpAsyncInit = function() {
- gapi.auth.authorize({
- immediate: true,
- response_type: 'code',
- cookie_policy: 'single_host_origin',
- client_id: '#{ENV['GOOGLE_KEY']}',
- scope: 'email profile'
- }, function(response) {
- return;
- });
- $('.googleplus-login').click(function(e) {
- e.preventDefault();
- gapi.auth.authorize({
- immediate: false,
- response_type: 'code',
- cookie_policy: 'single_host_origin',
- client_id: '#{ENV['GOOGLE_KEY']}',
- scope: 'email profile'
- }, function(response) {
- if (response && !response.error) {
- // google authentication succeed, now post data to server.
- jQuery.ajax({type: 'POST', url: "/auth/google_oauth2/callback",
data: response,
- success: function(data) {
- // Log the data returning from google.
- console.log(data)
+ window.gpAsyncInit = function() {
+ gapi.auth.authorize({
+ immediate: true,
+ response_type: 'code',
+ cookie_policy: 'single_host_origin',
+ client_id: '#{ENV['GOOGLE_KEY']}',
+ scope: 'email profile'
+ }, function(response) {
+ return;
+ });
+ $('.googleplus-login').click(function(e) {
+ e.preventDefault();
+ gapi.auth.authorize({
+ immediate: false,
+ response_type: 'code',
+ cookie_policy: 'single_host_origin',
+ client_id: '#{ENV['GOOGLE_KEY']}',
+ scope: 'email profile'
+ }, function(response) {
+ if (response && !response.error) {
+ // google authentication succeed, now post data to server.
+ jQuery.ajax({type: 'POST', url:
"/auth/google_oauth2/callback", data: response,
+ success: function(data) {
+ // Log the data returning from google.
+ console.log(data)
+ }
+ });
+ } else {
+ // google authentication failed.
+ console.log("FAILED")
}
});
- } else {
- // google authentication failed.
- console.log("FAILED")
- }
- });
- });
- };
- </script>
- </head>
- <body>
- <ul>
- <li><a href='/auth/google_oauth2'>Sign in with Google</a></li>
- <li><a href='#' class="googleplus-login">Sign in with Google via
AJAX</a></li>
- </ul>
- </body>
-</html>
+ });
+ };
+ </script>
+ </head>
+ <body>
+ <ul>
+ <li><a href='/auth/google_oauth2'>Sign in with Google</a></li>
+ <li><a href='#' class="googleplus-login">Sign in with Google via
AJAX</a></li>
+ </ul>
+ </body>
+ </html>
HTML
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/omniauth/google_oauth2/version.rb
new/lib/omniauth/google_oauth2/version.rb
--- old/lib/omniauth/google_oauth2/version.rb 2018-01-26 08:47:26.000000000
+0100
+++ new/lib/omniauth/google_oauth2/version.rb 2018-12-08 00:59:10.000000000
+0100
@@ -2,6 +2,6 @@
module OmniAuth
module GoogleOauth2
- VERSION = '0.5.3'
+ VERSION = '0.5.4'
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/omniauth/strategies/google_oauth2.rb
new/lib/omniauth/strategies/google_oauth2.rb
--- old/lib/omniauth/strategies/google_oauth2.rb 2018-01-26
08:47:26.000000000 +0100
+++ new/lib/omniauth/strategies/google_oauth2.rb 2018-12-08
00:59:10.000000000 +0100
@@ -22,9 +22,9 @@
option :verify_iss, true
option :client_options,
- site: 'https://accounts.google.com',
- authorize_url: '/o/oauth2/auth',
- token_url: '/o/oauth2/token'
+ site: 'https://oauth2.googleapis.com',
+ authorize_url: 'https://accounts.google.com/o/oauth2/auth',
+ token_url: '/token'
def authorize_params
super.tap do |params|
@@ -193,6 +193,7 @@
def verify_token(access_token)
return false unless access_token
+
raw_response = client.request(:get,
'https://www.googleapis.com/oauth2/v3/tokeninfo',
params: { access_token: access_token
}).parsed
raw_response['aud'] == options.client_id ||
options.authorized_client_ids.include?(raw_response['aud'])
@@ -200,12 +201,14 @@
def verify_hd(access_token)
return true unless options.hd
+
@raw_info ||=
access_token.get('https://www.googleapis.com/plus/v1/people/me/openIdConnect').parsed
options.hd = options.hd.call if options.hd.is_a? Proc
allowed_hosted_domains = Array(options.hd)
raise CallbackError.new(:invalid_hd, 'Invalid Hosted Domain') unless
allowed_hosted_domains.include?(@raw_info['hd']) || options.hd == '*'
+
true
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2018-01-26 08:47:26.000000000 +0100
+++ new/metadata 2018-12-08 00:59:10.000000000 +0100
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: omniauth-google-oauth2
version: !ruby/object:Gem::Version
- version: 0.5.3
+ version: 0.5.4
platform: ruby
authors:
- Josh Ellithorpe
@@ -9,7 +9,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2018-01-26 00:00:00.000000000 Z
+date: 2018-12-07 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: jwt
@@ -141,7 +141,7 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.6.11
+rubygems_version: 2.6.13
signing_key:
specification_version: 4
summary: A Google OAuth2 strategy for OmniAuth 1.x
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/omniauth/strategies/google_oauth2_spec.rb
new/spec/omniauth/strategies/google_oauth2_spec.rb
--- old/spec/omniauth/strategies/google_oauth2_spec.rb 2018-01-26
08:47:26.000000000 +0100
+++ new/spec/omniauth/strategies/google_oauth2_spec.rb 2018-12-08
00:59:10.000000000 +0100
@@ -30,15 +30,15 @@
describe '#client_options' do
it 'has correct site' do
- expect(subject.client.site).to eq('https://accounts.google.com')
+ expect(subject.client.site).to eq('https://oauth2.googleapis.com')
end
it 'has correct authorize_url' do
- expect(subject.client.options[:authorize_url]).to eq('/o/oauth2/auth')
+ expect(subject.client.options[:authorize_url]).to
eq('https://accounts.google.com/o/oauth2/auth')
end
it 'has correct token_url' do
- expect(subject.client.options[:token_url]).to eq('/o/oauth2/token')
+ expect(subject.client.options[:token_url]).to eq('/token')
end
describe 'overrides' do