Google provider accepts additional authentication params #734
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows setting
config.google.auth_params = {access_type: :offline, hd: 'mydomain.com'}
Solves #702
A better solution might be to merge these params with the ones hard coded in
oauth2.rb
and passed toclient.auth_code.authorize_url
. That would then make it easier to extend this to other providers, e.g. to add include_email for #719. I've instead used the auth_url to avoid changing theSorcery::Protocols::Oauth2#authorize_url
method signature for everyone. If you prefer I'll add an extra argument there instead, i.e.authorize_url(options = {}, auth_params = {})
.