-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix broken backward compatibility (callback_url) #82
Conversation
(by default, keep the same callback_url in callback_phase and request_phase)
To me the better solution would be to have |
@agrobbin yes, I agree, but currently, there might be more than 300 broken projects with this change introduced in version 1.4.0, see this comment: |
fix switched to the |
The inclusion of query parameters by default broke our production site for awhile today while we figured out what was happening. It seems the RFC doesn't stipulate the correct behavior for OAuth2 providers with regards to verifying a registered callback url vs the input. In our case, the provider we were using is explicitly verifying the query components of the URI in addition to the scheme, host, and path. |
omniauth-oauth2 v1.4.0 stopped overriding callback_url, this brings back the default implementation. omniauth/omniauth-oauth2@85fdbe1 It's the same fix as Shopify/omniauth-shopify-oauth2#32 and others: omniauth/omniauth-oauth2#82 (reference)
* Fix compatibility with omniauth-oauth 1.4+ References: * omniauth/omniauth-oauth2#70 * omniauth/omniauth-oauth2@2615267 * omniauth/omniauth-oauth2#82 * jdennes/omniauth-createsend#3 * WebTheoryLLC/omniauth-twitch#4 * jdennes/omniauth-createsend#5 * DripEmail/omniauth-drip#6 * Don't force https if it's localhost * Allow 127.0.0.1 and localhost to be on http * Lookup IP for the given host and force ssl Avoid to force ssl for local IPs (127/8 network) * Improve resolving * Improve even more * Fix regexp * Allow fe80::* entirely
I just stumbled onto this after running into the same issue other folks are having.
I'm not sure that is true. Looking at the RFC: https://tools.ietf.org/html/rfc6749#section-4.1.3
The RFC says that the |
This is a fix for broken backward compatibility which was introduced with pull request #70
Some OAuth2 providers (like
omniauth-google-oauth2
) fails ifcallback_url
is not the same incallback_phase
andrequest_phase
.Prior to version 1.4.0
callback_url
was overridden (andquery_string
was discarded) which was problem for @agrobbin and some others.This pull request propose fix with new option
include_query_string
(by default set to false, to preserve backward compatibility) and those who needs full callback_url (with query_string) in the will set this option to true:include_query_string: true