Skip to content

Google provider accepts additional authentication params#734

Open
Jamedjo wants to merge 2 commits intoNoamB:masterfrom
Jamedjo:google-oauth-params
Open

Google provider accepts additional authentication params#734
Jamedjo wants to merge 2 commits intoNoamB:masterfrom
Jamedjo:google-oauth-params

Conversation

@Jamedjo
Copy link

@Jamedjo Jamedjo commented Oct 28, 2015

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 to client.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 the Sorcery::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 = {}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant