-
Notifications
You must be signed in to change notification settings - Fork 403
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
Remove query string from redirect_uri on callback #221
Conversation
Thanks for the PR. Can you explain what this is fixing? |
Hi, after a while debugging with byebug with a friend (that is the real genious, who found the solution), we found that the callback uri generated by the super call contains also the code parameter and for this reason facebook bounces (probably they switched to a different policy over callback uri??) in any case without parameter works. Hope someone will discover what happened facebook side. |
Yes, this PR fixes problem with logging with newest version of facebook api |
Hey @gioblu, thanks for this fix. I'm using it. It would be ideal though that the fix was backed by a test, else the PR is incomplete. |
If folks want to keep the querystring (i.e. they specify that in the Facebook app config) then this would break that, I think. Is that correct? I think perhaps it would be better to use the existing |
Sounds good, but by default omniauth should 'just work' I believe! No config required |
@mkdynamic I use with Devise and Rails, and I did what you suggested to configure After some adjusts in Facebook > Settings, and adding the callback url to Valid OAuth redirect URIs. After did this I received error csrf_detected, then adjust The result (in my case only in devise.rb):
|
Thanks, worked for me. I also had to add the info_fields: 'name,email' to the config since facebook does not seem to be sending email by default anymore. |
I had the same issue of this happening (today) without any of my code changing, and the fix detailed by @robban worked for me. Rails 4.2.4 app using Devise and OmniAuth. |
I see that the recommended fix is trivial to add to one's project, but improving omniauth-facebook to work without this config needed seems easy too. Having to add |
Thanks for the thoughts everyone, I'm sold this is a good fix -- agree things should work out the box. It is a backwards incompatible change, technically speaking, so it will make sense bump the major version when releasing. That seems like a good trade-off. Could you add a test case to cover this? @gioblu I'll try to get this merged and push a new release later this evening. |
Remove query string from redirect_uri on callback
Fix released in 3.0.0. Thanks for the contribution @gioblu and feedback everyone else. |
No description provided.