forked from oauth-xx/oauth2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc040f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit should resolve issue: NilClass# (OmniAuth::Strategies::Facebook::NoAuthorizationCodeError) "must pass either a
code
parameter or a signed request (viasigned_request
parameter or afbsr_XXX
cookie)"cc040f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems Net::HTTP will decode get automatically http://ruby-doc.org/stdlib-2.1.0/libdoc/net/http/rdoc/Net/HTTP.html#method-i-get.
And Faraday seems assume this will be done as well lostisland/faraday_middleware#84
Just curious why this is falling down so that decoding needs to be done here in oauth2.
cc040f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My faraday middleware actually doesn't assume anything, because of the great variety and inconsistency between net/http versions. It just asks for compressed data and uncompresses it.
cc040f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imho, it depends on the Ruby version. For 2.1.1 it's probably not needed (see discussion here: lostisland/faraday_middleware#84 )