I got it working by setting the login_hint
parameter using the additional_parameters
hash which is available on Signet::OAuth2::Client
.
Basically, doing the following:
client = Google::APIClient.new(application_name: 'test application', application_version: '0.0.1')
client.authorization.additional_parameters[:login_hint] = 'some_address@gmail.com'
If you get an error about additional_parameters
not being defined then make sure you are using a recent version of the signet
gem or use the latest from the master branch.