-
-
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
1.4.0 makes my rails app unable to sign in with facebook #81
Comments
I'm getting the same error with omniauth-google-oauth2, after upgrading to 1.4.0.
|
+1 here with google. getting redirect_uri_mismatch as well |
I guess it has to do with this commit: |
I'm getting the same problem. |
Yes it's because of 2615267 by @sferik . The redefinition of callback_url was deleted from OmniAuth::Strategies::OAuth2 while it was used in the strategy to get redirect_uri, which should be the same redirect_uri which we sent to facebook without params (code, etc). You can use 1.3.1 version of the gem before the bug would be fixed. |
+1 to 1.3.1 temporarily fixes the issue |
i struggled with this for about a week before downgrading to 1.2! |
Yeah same here! |
What does |
unfortunately, google oauth2 doesn't work even with |
maybe a simple fix like this would work: #82 |
omniauth-oauth2 is the oauth library that omniauth plugins use under the hood. Version 1.4.0 introduced a bug causing most requests to fail, which can be found here: omniauth/omniauth-oauth2#81 It should be fixed in future versions, at which point this change can be reverted. But for now, this gets registrar working again. Confirmed to fix the problem (passed testing)
I lost 2 days of work trying to track down why my custom provider was returning an |
According to Section 3.1.2 of the OAuth 2 spec:
I’m sorry implementing this part of the spec has caused some OAuth providers to break. Gems for such providers should specify their spec.add_dependency 'omniauth-oauth2', '~> 1.3.1' |
I fix using: gem 'omniauth-oauth2', '~> 1.3.1' |
The version 1.4 of omniauth-oauth2 causes a problem in google oauth login. See omniauth/omniauth-oauth2#81 (comment)
I test the |
Ok just figure out some configuration not deleted when trying to fix the problem myself. |
omniauth-oauth2 version 1.4.x breaks the OAuth2 dance. See omniauth/omniauth-oauth2#81
@sferik is there not a better solution for this yet? 6 months later and I'm still running into this problem in oAuth Strategies. How is this acceptable to just ignore? |
I was able to fix the issue by restoring the module OmniAuth
module Strategies
class MyStrategy < OmniAuth::Strategies::OAuth2
...
def callback_url
full_host + script_name + callback_path
end
... see breaking change |
Was # Over-ride callback_url definition to maintain # compatibility with omniauth-oauth2 >= 1.4.0 # # See: omniauth/omniauth-oauth2#81 def callback_url # Fixes regression in omniauth-oauth2 v1.4.0 by omniauth/omniauth-oauth2@85fdbe1 options[:callback_url] || (full_host + script_name + callback_path) end
It seems rediculous that this change occurred for ONE strategy and broke every other single strategy out there.. IMHO it would have made more sense for the one strategy that needed the query parameters to override callback_url in it's own strategy. |
update for omniauth-oauth2 issue omniauth/omniauth-oauth2#81
…rsion of omniauth-oauth2(1.4) breaks for some oauth providers like Facebook and Google. omniauth/omniauth-oauth2#81
…rsion of omniauth-oauth2(1.4) breaks for some oauth providers like Facebook and Google. omniauth/omniauth-oauth2#81
Update navbar links using Devise paths, set linkedin-oauth2 provider to linkedin, and install omniauth-oauth2 version 1.3.1, due to: omniauth/omniauth-oauth2#81
Is this a wontfix? |
We're not planning on reverting, no. This was implemented a year and a half ago to adhere to the OAuth 2 spec. I recommend reaching out to the specific gem providers you require for them to make the necessary updates. |
rails 4.1.13
devise 3.5.2
omniauth (1.2.2)
omniauth-facebook (2.0.1)
1.3.1 was fine
Error:
The text was updated successfully, but these errors were encountered: