Module: Rack::OAuth2::Util

Defined in:
lib/patch/rack/oauth2/util.rb

Overview

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

Class Method Summary collapse

Class Method Details

.compact_hash_with_blank_redirect_uri(hash) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/patch/rack/oauth2/util.rb', line 4

def compact_hash_with_blank_redirect_uri(hash)
  original_redirect_uri = hash[:redirect_uri]
  result = compact_hash_without_blank_redirect_uri hash
  if original_redirect_uri
    result[:redirect_uri] ||= original_redirect_uri
  end
  result
end