Skip to content

Commit b096262

Browse files
committed
Merge pull request omniauth#20 from southpolesteve/master
Ability to specify scope on a individual auth request with a URL parameter
2 parents 4c9caf9 + e31224c commit b096262

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/omniauth/strategies/github.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ class GitHub < OmniAuth::Strategies::OAuth2
1212
def request_phase
1313
super
1414
end
15+
16+
def authorize_params
17+
if request.params["scope"]
18+
super.merge({:scope => request.params["scope"]})
19+
else
20+
super
21+
end
22+
end
1523

1624
uid { raw_info['id'].to_s }
1725

0 commit comments

Comments
 (0)