auth0 / omniauth-auth0

OmniAuth strategy to login with Auth0
MIT License
125 stars 67 forks source link

Pass query string along in authorize_url #50

Closed robinw777 closed 6 years ago

robinw777 commented 7 years ago

Although the documentation https://github.com/auth0/omniauth-auth0#auth-parameters says you can append query string (e.g. redirect_to '/auth/auth0?connection=google-oauth2'), it's not added to the authorize_url. This makes it hard to dynamically specify a connection in our app.

wingrunr21 commented 6 years ago

@hzalaz can this be merged?

tomgi commented 6 years ago

Thanks for this @robinw777, we've encountered the same problem recently. However can it be made more selective to only pass connection parameter through? When all the parameters are being passed through it's causing problems when the application using this gem is both OAuth2 provider (for some other applications) and OAuth2 client (for Auth0). In such case the nested redirect_uri it being passed through to Auth0 and overrides the most outer one. So for example when the chain of OAuth2 authentications looks like this: A -> B -> Auth0 -> Google Auth0 will receive redirect_uri pointing to A instead of B.

I've created a PR based on your solution but passing only connection parameter - https://github.com/auth0/omniauth-auth0/pull/54

cocojoe commented 6 years ago

@joshcanhelp would rather have params to specify redirect / connection etc Can you look at this in tandem with #54 Thanks

joshcanhelp commented 6 years ago

Closing in favor of #54