Closed aneziocampos closed 11 years ago
is there a significant difference between the development and production configuration in the OmniAuth side of things? Also, if you have not already, I would try clearing out the gems, and just using omniauth-stripe-connect with the "stripe_connect" strategy.
require 'sinatra'
require 'omniauth-stripe-connect'
require 'multi_json'
class App < Sinatra::Base
before do
content_type 'application/json'
puts MultiJson.encode request.env
end
get '/' do
'<a href="/auth/stripe_connect">stripe</a>'
end
get '/auth/:provider/callback' do
content_type 'application/json'
MultiJson.encode request.env
end
end
use Rack::Session::Cookie
use OmniAuth::Builder do
provider :stripe_connect, CLIENT_ID, SECRET, :scope => :read_only
end
run App
The above code successfully authenticated, with the below gems.
isaac@example: bundle list
Gems included by the bundle:
* bundler (1.2.0.rc)
* faraday (0.8.4)
* hashie (1.2.0)
* httpauth (0.2.0)
* jwt (0.1.5)
* multi_json (1.3.6)
* multipart-post (1.1.5)
* oauth2 (0.8.0)
* omniauth (1.1.1)
* omniauth-oauth2 (1.1.1)
* omniauth-stripe-connect (2.0.0)
* rack (1.4.1)
* rack-protection (1.2.0)
* sinatra (1.3.3)
* tilt (1.3.3)
Ive found my problem, it was related to the Session store, it wasnt working as it should. It is working fine now. Thanks
Happy to help. Best of luck!
I am using the gem it is working perfectly on my local machine, but when i try it on production it always returns
2012-10-15T15:05:23+00:00 app[web.1]: (stripe_platform) Callback phase initiated. 2012-10-15T15:05:27+00:00 app[web.1]: (stripe_platform) Authentication failure! invalid_credentials: OmniAuth::Strategies::OAuth2::CallbackError, OmniAuth::Strategies::OAuth2::CallbackError
I tried using test and production keys and results are the same
I am using omniauth 1.1.1 and omniauth-stripe-platform 1.0.2 and also tried with omniauth-stripe-connect 2.0.0