omniauth-google-oauth2 0.2.5 → 0.2.6
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 +6 -14
- data/CHANGELOG.md +14 -0
- data/README.md +28 -3
- data/lib/omniauth/google_oauth2/version.rb +1 -1
- data/lib/omniauth/strategies/google_oauth2.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MjJiYzhkYmQ4N2JkMDQ3ODA4YWU2MjE5ZjhiZTY2YTYwOGEwYzAyMjU3ZDFm
|
10
|
-
ZjhhNDE2YmVmZjY0YmJjMTU4MDQ0NGIyYWE4YTkyNmU1Y2ZkOWM5NGQyYmVh
|
11
|
-
Y2ViNTg5NTMzZjBhMmU4YzRhOWMyOGNmZjJhNzlhMGU2ZDE5MTE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YzczYTdkNGZmYWUzNDdjMWEwMzRhY2ZlYzJjY2UwOTA0OGQ4NDlhYzhhNzI5
|
14
|
-
YTc0NWNhOWQ5N2I3YjVmY2U1NjUxMDI2MzY3MTJiMmY2NGQ1MmQ1ZDNkMzYy
|
15
|
-
MjM0Y2FmM2M2MTc2ZjM3ZTk2Mjc1NDBjYmUzMjkwMmJlNzRlMDI=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 94f7c1eb0afd85643a31c0104ad8ce1ec2d71a19
|
4
|
+
data.tar.gz: da381cb763e8f714a0e5616316565fbd6792ef4a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 56cc961665bf7ba7d01921f91a44e903f331156c0d1515d83458f8f554eea2d00144943c48b313b3a2c9e162c03a28e7cbb27f030d0242af1b7d17053bd289d7
|
7
|
+
data.tar.gz: 21679a5708569c5d39edf3efa8da9291a6bd8ffdd816c4b2f1061f8f266e467eba5d4e3c83096fff14216dfb848525fc0b09b7c7671c4e7abc10d60d90a497c2
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## 0.2.6 - 2014-10-26
|
5
|
+
|
6
|
+
### Added
|
7
|
+
- Nothing.
|
8
|
+
|
9
|
+
### Deprecated
|
10
|
+
- Nothing.
|
11
|
+
|
12
|
+
### Removed
|
13
|
+
- Nothing.
|
14
|
+
|
15
|
+
### Fixed
|
16
|
+
- Hybrid authorization issues due to bad method alias.
|
17
|
+
|
4
18
|
## 0.2.5 - 2014-07-09
|
5
19
|
|
6
20
|
### Added
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Then `bundle install`.
|
|
24
24
|
* Select your project.
|
25
25
|
* Click 'APIs & auth'
|
26
26
|
* Make sure "Contacts API" and "Google+ API" are on.
|
27
|
-
* Go to Consent Screen, and provide a 'PRODUCT NAME'
|
27
|
+
* Go to Consent Screen, and provide an 'EMAIL ADDRESS' and a 'PRODUCT NAME'
|
28
28
|
* Wait 10 minutes for changes to take effect.
|
29
29
|
|
30
30
|
## Usage
|
@@ -130,7 +130,25 @@ Here's an example of an authentication hash available in the callback by accessi
|
|
130
130
|
|
131
131
|
### Devise
|
132
132
|
|
133
|
-
|
133
|
+
First define your application id and secret in "config/initializers/devise.rb"
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
config.omniauth :google_oauth2, "APP_ID", "APP_SECRET", { }
|
137
|
+
```
|
138
|
+
|
139
|
+
Then add the following to 'config/routes.rb' so the callback routes are defined.
|
140
|
+
|
141
|
+
```ruby
|
142
|
+
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
|
143
|
+
```
|
144
|
+
|
145
|
+
Make sure your model is omniauthable. Generally this is "/app/models/user.rb"
|
146
|
+
|
147
|
+
```ruby
|
148
|
+
devise :omniauthable, :omniauth_providers => [:google_oauth2]
|
149
|
+
```
|
150
|
+
|
151
|
+
Then make sure your callbacks controller is setup.
|
134
152
|
|
135
153
|
```ruby
|
136
154
|
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
@@ -166,7 +184,14 @@ def self.find_for_google_oauth2(access_token, signed_in_resource=nil)
|
|
166
184
|
user
|
167
185
|
end
|
168
186
|
```
|
169
|
-
|
187
|
+
|
188
|
+
For your views you can login using:
|
189
|
+
|
190
|
+
```ruby
|
191
|
+
<%= link_to "Sign in with Google", user_omniauth_authorize_path(:google_oauth2) %>
|
192
|
+
```
|
193
|
+
|
194
|
+
An overview is available at https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
|
170
195
|
|
171
196
|
### One-time Code Flow (Hybrid Authentication)
|
172
197
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-google-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Ellithorpe
|
@@ -9,62 +9,62 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: omniauth-oauth2
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.1'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '1.1'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rspec
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 2.14.0
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 2.14.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rake
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
description: A Google OAuth2 strategy for OmniAuth 1.x
|
@@ -74,8 +74,8 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .gitignore
|
78
|
-
- .travis.yml
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
79
|
- CHANGELOG.md
|
80
80
|
- Gemfile
|
81
81
|
- README.md
|
@@ -99,17 +99,17 @@ require_paths:
|
|
99
99
|
- lib
|
100
100
|
required_ruby_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.2.2
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: A Google OAuth2 strategy for OmniAuth 1.x
|