google_sign_in 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/Gemfile.lock +95 -75
- data/README.md +4 -1
- data/app/controllers/google_sign_in/authorizations_controller.rb +1 -1
- data/app/controllers/google_sign_in/callbacks_controller.rb +1 -1
- data/google_sign_in.gemspec +1 -1
- data/lib/google_sign_in/engine.rb +2 -4
- data/test/dummy/config/application.rb +1 -1
- data/test/helpers/button_helper_test.rb +0 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07ffe2df555e62583212eeed44495dad288e37609a46c4eb1f4717aedb11f4c9
|
4
|
+
data.tar.gz: b4eff8b60ac9cfdb32c835bf0780722f87fb34cfd4b0673a57bdfe4708841569
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fd9e9b40717cf051753ec5bf737281d33f0e3ba6914fbd364e9c8c1d316c9a21a8d0cdead93df94e1a674aa6d6774e3ec9608b6427e56e70021d6da199a7f79
|
7
|
+
data.tar.gz: 10c98f8dbb827cfeca28f59b9857d86bb5e6f3f0122e4f1b5dc64c4b29b663b2d01520893d41a18af94bf6cc6cc6e5d83e476be5554f27b08450f382e3f7a16e
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
google_sign_in (1.
|
4
|
+
google_sign_in (1.2.0)
|
5
5
|
google-id-token (>= 1.4.0)
|
6
6
|
oauth2 (>= 1.4.0)
|
7
7
|
rails (>= 5.2.0)
|
@@ -9,121 +9,140 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actioncable (
|
13
|
-
actionpack (=
|
12
|
+
actioncable (6.0.0)
|
13
|
+
actionpack (= 6.0.0)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
|
17
|
-
actionpack (=
|
18
|
-
|
19
|
-
|
16
|
+
actionmailbox (6.0.0)
|
17
|
+
actionpack (= 6.0.0)
|
18
|
+
activejob (= 6.0.0)
|
19
|
+
activerecord (= 6.0.0)
|
20
|
+
activestorage (= 6.0.0)
|
21
|
+
activesupport (= 6.0.0)
|
22
|
+
mail (>= 2.7.1)
|
23
|
+
actionmailer (6.0.0)
|
24
|
+
actionpack (= 6.0.0)
|
25
|
+
actionview (= 6.0.0)
|
26
|
+
activejob (= 6.0.0)
|
20
27
|
mail (~> 2.5, >= 2.5.4)
|
21
28
|
rails-dom-testing (~> 2.0)
|
22
|
-
actionpack (
|
23
|
-
actionview (=
|
24
|
-
activesupport (=
|
29
|
+
actionpack (6.0.0)
|
30
|
+
actionview (= 6.0.0)
|
31
|
+
activesupport (= 6.0.0)
|
25
32
|
rack (~> 2.0)
|
26
33
|
rack-test (>= 0.6.3)
|
27
34
|
rails-dom-testing (~> 2.0)
|
28
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
29
|
-
|
30
|
-
|
35
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
36
|
+
actiontext (6.0.0)
|
37
|
+
actionpack (= 6.0.0)
|
38
|
+
activerecord (= 6.0.0)
|
39
|
+
activestorage (= 6.0.0)
|
40
|
+
activesupport (= 6.0.0)
|
41
|
+
nokogiri (>= 1.8.5)
|
42
|
+
actionview (6.0.0)
|
43
|
+
activesupport (= 6.0.0)
|
31
44
|
builder (~> 3.1)
|
32
45
|
erubi (~> 1.4)
|
33
46
|
rails-dom-testing (~> 2.0)
|
34
|
-
rails-html-sanitizer (~> 1.
|
35
|
-
activejob (
|
36
|
-
activesupport (=
|
47
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
48
|
+
activejob (6.0.0)
|
49
|
+
activesupport (= 6.0.0)
|
37
50
|
globalid (>= 0.3.6)
|
38
|
-
activemodel (
|
39
|
-
activesupport (=
|
40
|
-
activerecord (
|
41
|
-
activemodel (=
|
42
|
-
activesupport (=
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
activerecord (=
|
51
|
+
activemodel (6.0.0)
|
52
|
+
activesupport (= 6.0.0)
|
53
|
+
activerecord (6.0.0)
|
54
|
+
activemodel (= 6.0.0)
|
55
|
+
activesupport (= 6.0.0)
|
56
|
+
activestorage (6.0.0)
|
57
|
+
actionpack (= 6.0.0)
|
58
|
+
activejob (= 6.0.0)
|
59
|
+
activerecord (= 6.0.0)
|
47
60
|
marcel (~> 0.3.1)
|
48
|
-
activesupport (
|
61
|
+
activesupport (6.0.0)
|
49
62
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
50
63
|
i18n (>= 0.7, < 2)
|
51
64
|
minitest (~> 5.1)
|
52
65
|
tzinfo (~> 1.1)
|
53
|
-
|
54
|
-
|
55
|
-
|
66
|
+
zeitwerk (~> 2.1, >= 2.1.8)
|
67
|
+
addressable (2.8.0)
|
68
|
+
public_suffix (>= 2.0.2, < 5.0)
|
56
69
|
builder (3.2.3)
|
57
|
-
byebug (
|
58
|
-
concurrent-ruby (1.
|
70
|
+
byebug (11.0.1)
|
71
|
+
concurrent-ruby (1.1.5)
|
59
72
|
crack (0.4.3)
|
60
73
|
safe_yaml (~> 1.0.0)
|
61
74
|
crass (1.0.4)
|
62
|
-
erubi (1.
|
63
|
-
faraday (0.
|
75
|
+
erubi (1.9.0)
|
76
|
+
faraday (0.16.2)
|
64
77
|
multipart-post (>= 1.2, < 3)
|
65
|
-
globalid (0.4.
|
78
|
+
globalid (0.4.2)
|
66
79
|
activesupport (>= 4.2.0)
|
67
80
|
google-id-token (1.4.2)
|
68
81
|
jwt (>= 1)
|
69
|
-
hashdiff (0.
|
70
|
-
i18n (1.
|
82
|
+
hashdiff (1.0.0)
|
83
|
+
i18n (1.6.0)
|
71
84
|
concurrent-ruby (~> 1.0)
|
72
|
-
jwt (
|
73
|
-
loofah (2.
|
85
|
+
jwt (2.2.1)
|
86
|
+
loofah (2.3.0)
|
74
87
|
crass (~> 1.0.2)
|
75
88
|
nokogiri (>= 1.5.9)
|
76
89
|
mail (2.7.1)
|
77
90
|
mini_mime (>= 0.1.1)
|
78
91
|
marcel (0.3.3)
|
79
92
|
mimemagic (~> 0.3.2)
|
80
|
-
method_source (0.9.
|
81
|
-
mimemagic (0.3.
|
82
|
-
|
83
|
-
|
84
|
-
|
93
|
+
method_source (0.9.2)
|
94
|
+
mimemagic (0.3.10)
|
95
|
+
nokogiri (~> 1)
|
96
|
+
rake
|
97
|
+
mini_mime (1.0.2)
|
98
|
+
mini_portile2 (2.6.1)
|
99
|
+
minitest (5.14.4)
|
85
100
|
multi_json (1.13.1)
|
86
101
|
multi_xml (0.6.0)
|
87
|
-
multipart-post (2.
|
88
|
-
nio4r (2.
|
89
|
-
nokogiri (1.
|
90
|
-
mini_portile2 (~> 2.
|
91
|
-
|
92
|
-
|
102
|
+
multipart-post (2.1.1)
|
103
|
+
nio4r (2.5.2)
|
104
|
+
nokogiri (1.12.5)
|
105
|
+
mini_portile2 (~> 2.6.1)
|
106
|
+
racc (~> 1.4)
|
107
|
+
oauth2 (1.4.2)
|
108
|
+
faraday (>= 0.8, < 2.0)
|
93
109
|
jwt (>= 1.0, < 3.0)
|
94
110
|
multi_json (~> 1.3)
|
95
111
|
multi_xml (~> 0.5)
|
96
112
|
rack (>= 1.2, < 3)
|
97
|
-
public_suffix (
|
98
|
-
|
113
|
+
public_suffix (4.0.1)
|
114
|
+
racc (1.5.2)
|
115
|
+
rack (2.0.7)
|
99
116
|
rack-test (1.1.0)
|
100
117
|
rack (>= 1.0, < 3)
|
101
|
-
rails (
|
102
|
-
actioncable (=
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
118
|
+
rails (6.0.0)
|
119
|
+
actioncable (= 6.0.0)
|
120
|
+
actionmailbox (= 6.0.0)
|
121
|
+
actionmailer (= 6.0.0)
|
122
|
+
actionpack (= 6.0.0)
|
123
|
+
actiontext (= 6.0.0)
|
124
|
+
actionview (= 6.0.0)
|
125
|
+
activejob (= 6.0.0)
|
126
|
+
activemodel (= 6.0.0)
|
127
|
+
activerecord (= 6.0.0)
|
128
|
+
activestorage (= 6.0.0)
|
129
|
+
activesupport (= 6.0.0)
|
111
130
|
bundler (>= 1.3.0)
|
112
|
-
railties (=
|
131
|
+
railties (= 6.0.0)
|
113
132
|
sprockets-rails (>= 2.0.0)
|
114
133
|
rails-dom-testing (2.0.3)
|
115
134
|
activesupport (>= 4.2.0)
|
116
135
|
nokogiri (>= 1.6)
|
117
|
-
rails-html-sanitizer (1.0
|
136
|
+
rails-html-sanitizer (1.2.0)
|
118
137
|
loofah (~> 2.2, >= 2.2.2)
|
119
|
-
railties (
|
120
|
-
actionpack (=
|
121
|
-
activesupport (=
|
138
|
+
railties (6.0.0)
|
139
|
+
actionpack (= 6.0.0)
|
140
|
+
activesupport (= 6.0.0)
|
122
141
|
method_source
|
123
142
|
rake (>= 0.8.7)
|
124
|
-
thor (>= 0.
|
125
|
-
rake (
|
126
|
-
safe_yaml (1.0.
|
143
|
+
thor (>= 0.20.3, < 2.0)
|
144
|
+
rake (13.0.0)
|
145
|
+
safe_yaml (1.0.5)
|
127
146
|
sprockets (3.7.2)
|
128
147
|
concurrent-ruby (~> 1.0)
|
129
148
|
rack (> 1, < 3)
|
@@ -131,17 +150,18 @@ GEM
|
|
131
150
|
actionpack (>= 4.0)
|
132
151
|
activesupport (>= 4.0)
|
133
152
|
sprockets (>= 3.0.0)
|
134
|
-
thor (0.20.
|
153
|
+
thor (0.20.3)
|
135
154
|
thread_safe (0.3.6)
|
136
155
|
tzinfo (1.2.5)
|
137
156
|
thread_safe (~> 0.1)
|
138
|
-
webmock (3.
|
157
|
+
webmock (3.7.6)
|
139
158
|
addressable (>= 2.3.6)
|
140
159
|
crack (>= 0.3.2)
|
141
|
-
hashdiff
|
142
|
-
websocket-driver (0.7.
|
160
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
161
|
+
websocket-driver (0.7.1)
|
143
162
|
websocket-extensions (>= 0.1.0)
|
144
|
-
websocket-extensions (0.1.
|
163
|
+
websocket-extensions (0.1.4)
|
164
|
+
zeitwerk (2.1.10)
|
145
165
|
|
146
166
|
PLATFORMS
|
147
167
|
ruby
|
@@ -155,4 +175,4 @@ DEPENDENCIES
|
|
155
175
|
webmock (>= 3.4.2)
|
156
176
|
|
157
177
|
BUNDLED WITH
|
158
|
-
1.17.
|
178
|
+
1.17.3
|
data/README.md
CHANGED
@@ -159,13 +159,16 @@ information contained in the token via the following instance methods:
|
|
159
159
|
|
160
160
|
* `given_name`: The user's given name.
|
161
161
|
|
162
|
-
* `
|
162
|
+
* `family_name`: The user's last name.
|
163
163
|
|
164
164
|
|
165
165
|
## Security
|
166
166
|
|
167
167
|
For information on our security response procedure, see [SECURITY.md](SECURITY.md).
|
168
168
|
|
169
|
+
## Maintenance
|
170
|
+
|
171
|
+
Short of patching critical security issues, this gem is now considered done, and will not see any further feature development or minor bug fixes. Feel free to fork this work under the MIT license and continue the feature development under a different name.
|
169
172
|
|
170
173
|
## License
|
171
174
|
|
@@ -5,7 +5,7 @@ class GoogleSignIn::AuthorizationsController < GoogleSignIn::BaseController
|
|
5
5
|
|
6
6
|
def create
|
7
7
|
redirect_to login_url(scope: 'openid profile email', state: state),
|
8
|
-
flash: { proceed_to: params.require(:proceed_to), state: state }
|
8
|
+
allow_other_host: true, flash: { proceed_to: params.require(:proceed_to), state: state }
|
9
9
|
end
|
10
10
|
|
11
11
|
private
|
data/google_sign_in.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'google_sign_in'
|
3
|
-
s.version = '1.2.
|
3
|
+
s.version = '1.2.1'
|
4
4
|
s.authors = ['David Heinemeier Hansson', 'George Claghorn']
|
5
5
|
s.email = ['david@basecamp.com', 'george@basecamp.com']
|
6
6
|
s.summary = 'Sign in (or up) with Google for Rails applications'
|
@@ -13,10 +13,8 @@ module GoogleSignIn
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
helper GoogleSignIn::Engine.helpers
|
19
|
-
end
|
16
|
+
config.to_prepare do
|
17
|
+
ActionController::Base.helper GoogleSignIn::Engine.helpers
|
20
18
|
end
|
21
19
|
|
22
20
|
initializer 'google_sign_in.mount' do |app|
|
@@ -10,7 +10,7 @@ Bundler.require(*Rails.groups)
|
|
10
10
|
module Dummy
|
11
11
|
class Application < Rails::Application
|
12
12
|
# Initialize configuration defaults for originally generated Rails version.
|
13
|
-
config.load_defaults
|
13
|
+
config.load_defaults 6.0
|
14
14
|
|
15
15
|
# Settings in config/environments/* take precedence over those specified here.
|
16
16
|
# Application configuration can go into files in config/initializers
|
@@ -4,7 +4,6 @@ class GoogleSignIn::ButtonHelperTest < ActionView::TestCase
|
|
4
4
|
test "generating a login button with text content" do
|
5
5
|
assert_dom_equal <<-HTML, google_sign_in_button("Log in with Google", proceed_to: "https://www.example.com/login")
|
6
6
|
<form action="/google_sign_in/authorization" accept-charset="UTF-8" method="post">
|
7
|
-
<input name="utf8" type="hidden" value="✓" />
|
8
7
|
<input name="proceed_to" type="hidden" value="https://www.example.com/login" />
|
9
8
|
<button type="submit">Log in with Google</button>
|
10
9
|
</form>
|
@@ -14,7 +13,6 @@ class GoogleSignIn::ButtonHelperTest < ActionView::TestCase
|
|
14
13
|
test "generating a login button with HTML content" do
|
15
14
|
assert_dom_equal <<-HTML, google_sign_in_button(proceed_to: "https://www.example.com/login") { image_tag("google.png") }
|
16
15
|
<form action="/google_sign_in/authorization" accept-charset="UTF-8" method="post">
|
17
|
-
<input name="utf8" type="hidden" value="✓" />
|
18
16
|
<input name="proceed_to" type="hidden" value="https://www.example.com/login" />
|
19
17
|
<button type="submit"><img src="/images/google.png"></button>
|
20
18
|
</form>
|
@@ -27,7 +25,6 @@ class GoogleSignIn::ButtonHelperTest < ActionView::TestCase
|
|
27
25
|
|
28
26
|
assert_dom_equal <<-HTML, button
|
29
27
|
<form action="/google_sign_in/authorization" accept-charset="UTF-8" method="post">
|
30
|
-
<input name="utf8" type="hidden" value="✓" />
|
31
28
|
<input name="proceed_to" type="hidden" value="https://www.example.com/login" />
|
32
29
|
<button type="submit" class="login-button" data-disable-with="Loading Google login…">Log in with Google</button>
|
33
30
|
</form>
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_sign_in
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
- George Claghorn
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: 3.4.2
|
98
|
-
description:
|
98
|
+
description:
|
99
99
|
email:
|
100
100
|
- david@basecamp.com
|
101
101
|
- george@basecamp.com
|
@@ -197,7 +197,7 @@ homepage: https://github.com/basecamp/google_sign_in
|
|
197
197
|
licenses:
|
198
198
|
- MIT
|
199
199
|
metadata: {}
|
200
|
-
post_install_message:
|
200
|
+
post_install_message:
|
201
201
|
rdoc_options: []
|
202
202
|
require_paths:
|
203
203
|
- lib
|
@@ -212,8 +212,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
|
-
rubygems_version: 3.
|
216
|
-
signing_key:
|
215
|
+
rubygems_version: 3.2.22
|
216
|
+
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: Sign in (or up) with Google for Rails applications
|
219
219
|
test_files:
|