Closed midwire closed 8 years ago
Whenever I try to authenticate in my specs, I can get a code just fine with:
@auth = Songkick::OAuth2::Provider::Authorization.new(@user, params)
However, when I try to get the access_token:
@oauth2 = Songkick::OAuth2::Provider.parse(@user, env)
it consistently fails. It seems the Router, after making this call:
request = request_from(env)
strips out the parameters, so the next call:
params = request.params
is always an empty hash.
Am I doing something wrong?
I can make the same calls using curl and everything works just fine. The RSpec mock environment seems to cause problems. Is that by design?
@midwire I'm having the same issue.
I think all you need to do is include rack-test in your Gemfile.
gem 'rack-test', :require => 'rack/test'
Thanks, I'll give that a try!
Whenever I try to authenticate in my specs, I can get a code just fine with:
However, when I try to get the access_token:
it consistently fails. It seems the Router, after making this call:
strips out the parameters, so the next call:
is always an empty hash.
Am I doing something wrong?
I can make the same calls using curl and everything works just fine. The RSpec mock environment seems to cause problems. Is that by design?