Skip to content

Commit

Permalink
Added device_id and device_name to authorize params
Browse files Browse the repository at this point in the history
  • Loading branch information
zquestz committed Jul 12, 2017
1 parent 7fdc025 commit 282097c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/omniauth/strategies/google_oauth2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GoogleOauth2 < OmniAuth::Strategies::OAuth2
option :skip_image_info, true
option :skip_jwt, false
option :jwt_leeway, 60
option :authorize_options, %i[access_type hd login_hint prompt request_visible_actions scope state redirect_uri include_granted_scopes openid_realm]
option :authorize_options, %i[access_type hd login_hint prompt request_visible_actions scope state redirect_uri include_granted_scopes openid_realm device_id device_name]
option :authorized_client_ids, []

option :client_options,
Expand Down
2 changes: 1 addition & 1 deletion spec/omniauth/strategies/google_oauth2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
end

describe '#authorize_options' do
%i[access_type hd login_hint prompt scope state].each do |k|
%i[access_type hd login_hint prompt scope state device_id device_name].each do |k|
it "should support #{k}" do
@options = { k => 'http://someval' }
expect(subject.authorize_params[k.to_s]).to eq('http://someval')
Expand Down

0 comments on commit 282097c

Please sign in to comment.