warden-github 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/warden-github/strategy.rb +2 -2
- data/lib/warden-github/version.rb +1 -1
- metadata +3 -3
@@ -10,12 +10,12 @@ Warden::Strategies.add(:github) do
|
|
10
10
|
begin
|
11
11
|
api = api_for(params['code'])
|
12
12
|
|
13
|
-
resp = api.get '/api/
|
13
|
+
resp = api.get '/api/v2/json/user/show' do |request|
|
14
14
|
request.params['access_token'] = api.token
|
15
15
|
end.body
|
16
16
|
|
17
17
|
user = JSON.load(resp)
|
18
|
-
success!(Warden::Github::Oauth::User.new(user, api.token))
|
18
|
+
success!(Warden::Github::Oauth::User.new(user['user'], api.token))
|
19
19
|
rescue OAuth2::Error
|
20
20
|
%(<p>Outdated ?code=#{params['code']}:</p><p>#{$!}</p><p><a href="/auth/github">Retry</a></p>)
|
21
21
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warden-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 2
|
10
|
+
version: 0.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Corey Donohoe
|