Sha256: 584243e7ab5287fca958cc3c6e247ddf2352d2092e2ece80f963e776412a766c

Contents?: true

Size: 455 Bytes

Versions: 13

Compression:

Stored size: 455 Bytes

Contents

# NOTE: Authorization code given via FB JS SDK needs blank string as redirect_uri

module Rack::OAuth2::Util
  class << self
    module ComcactHashWithBrankRedirect
      def compact_hash(hash)
        original_redirect_uri = hash[:redirect_uri]
        result = super
        if original_redirect_uri
          result[:redirect_uri] ||= original_redirect_uri
        end
        result
      end
    end
    prepend ComcactHashWithBrankRedirect
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fb_graph2-1.3.0 lib/patch/rack/oauth2/util.rb
fb_graph2-1.2.0 lib/patch/rack/oauth2/util.rb
fb_graph2-1.1.1 lib/patch/rack/oauth2/util.rb
fb_graph2-1.1.0 lib/patch/rack/oauth2/util.rb
fb_graph2-1.0.1 lib/patch/rack/oauth2/util.rb
fb_graph2-1.0.0 lib/patch/rack/oauth2/util.rb
fb_graph2-0.9.1 lib/patch/rack/oauth2/util.rb
fb_graph2-0.9.0 lib/patch/rack/oauth2/util.rb
fb_graph2-0.8.0 lib/patch/rack/oauth2/util.rb
fb_graph2-0.7.9 lib/patch/rack/oauth2/util.rb
fb_graph2-0.7.8 lib/patch/rack/oauth2/util.rb
fb_graph2-0.7.7 lib/patch/rack/oauth2/util.rb
fb_graph2-0.7.6 lib/patch/rack/oauth2/util.rb