contiamo / omniauth-magento

Omniauth strategy for magento
4 stars 7 forks source link

undefined method `downcase' for nil:NilClass #4

Open mmahalwy opened 10 years ago

mmahalwy commented 10 years ago
oauth (0.4.7) lib/oauth/request_proxy/base.rb:93:in `normalized_uri'
oauth (0.4.7) lib/oauth/request_proxy/base.rb:113:in `signature_base_string'
oauth (0.4.7) lib/oauth/signature/base.rb:77:in `signature_base_string'
oauth (0.4.7) lib/oauth/signature/hmac/base.rb:12:in `digest'
oauth (0.4.7) lib/oauth/signature/base.rb:65:in `signature'
oauth (0.4.7) lib/oauth/signature.rb:23:in `sign'
oauth (0.4.7) lib/oauth/client/helper.rb:45:in `signature'
oauth (0.4.7) lib/oauth/client/helper.rb:75:in `header'
oauth (0.4.7) lib/oauth/client/net_http.rb:91:in `set_oauth_header'
oauth (0.4.7) lib/oauth/client/net_http.rb:30:in `oauth!'
oauth (0.4.7) lib/oauth/consumer.rb:224:in `sign!'
oauth (0.4.7) lib/oauth/consumer.rb:188:in `create_signed_request'
oauth (0.4.7) lib/oauth/consumer.rb:159:in `request'
oauth (0.4.7) lib/oauth/consumer.rb:194:in `token_request'
oauth (0.4.7) lib/oauth/tokens/request_token.rb:18:in `get_access_token'
omniauth-oauth (1.0.1) lib/omniauth/strategies/oauth.rb:57:in `callback_phase'
omniauth (1.2.1) lib/omniauth/strategy.rb:227:in `callback_call'
omniauth (1.2.1) lib/omniauth/strategy.rb:184:in `call!'
omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.2.1) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.2.1) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.2.1) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.2.1) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.2.1) lib/omniauth/builder.rb:59:in `call'
chris-baynes commented 10 years ago

Did you leave out the scheme (http/https) when specifying your site? Oauth will have a problem if you leave that out.

mmahalwy commented 10 years ago
provider :magento, 't', 'k', 
      setup: (lambda do |env|
        # The following can be set dynamically from params, session, or ENV
        request = Rack::Request.new(env)
        # puts request.params
        env['omniauth.strategy'].options[:client_options][:authorize_path] = "/su"
        env['omniauth.strategy'].options[:client_options][:site] = request.params["site"]
        env['omniauth.strategy'].options[:consumer_key] = "t"
        env['omniauth.strategy'].options[:consumer_secret] = "k"
      end)

The problem is that it works on making the call to the site but then on the callback there is no params["site"]