We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 48d718c + dcc846a commit e0304e7Copy full SHA for e0304e7
lib/omniauth/strategies/github.rb
@@ -32,7 +32,7 @@ def authorize_params
32
'name' => raw_info['name'],
33
'image' => raw_info['avatar_url'],
34
'urls' => {
35
- 'GitHub' => "https://github.com/#{raw_info['login']}",
+ 'GitHub' => raw_info['html_url'],
36
'Blog' => raw_info['blog'],
37
},
38
}
spec/omniauth/strategies/github_spec.rb
@@ -132,4 +132,11 @@
132
end
133
134
135
+ context '#info.urls' do
136
+ it 'should use html_url from raw_info' do
137
+ subject.stub(:raw_info).and_return({ 'login' => 'me', 'html_url' => 'http://enterprise/me' })
138
+ subject.info['urls']['GitHub'].should == 'http://enterprise/me'
139
+ end
140
141
+
142
0 commit comments