isaacsanders / omniauth-stripe-connect

Stripe Connect OAuth2 Strategy for OmniAuth 1.0
MIT License
130 stars 74 forks source link

Uploaded Stripe app to Heroku now i get error omniauth: (stripe_connect) Authentication failure! invalid_credentials: OAuth2::Error, invalid_client: No such API key: Bearer #37

Closed farhan-syed closed 8 years ago

farhan-syed commented 8 years ago

i tested my app locally and works fine, but then i deployed it to Heroku and no im running into issues. i get this error after i skip the form for redirection: ERROR -- omniauth: (stripe_connect) Authentication failure! invalid_credentials: OAuth2::Error, <invalid_client: No such API key: Bearer 2015-08-14T07:37:34.345409+00:00 app[web.1]: { 2015-08-14T07:37:34.345425+00:00 app[web.1]: "error": "invalid_client", 2015-08-14T07:37:34.345427+00:00 app[web.1]: "error_description": "No such API key: Bearer">

This is what my files look like

using gem figaro for handling the keys.

application.yml: <STRIPE_SECRET: sk_test_*************** STRIPE_CONNECT_CLIENT_ID: ca_**************>

omniauth.rb:

<Rails.application.config.middleware.use OmniAuth::Builder do provider :stripe_connect, ENV['STRIPE_CONNECT_CLIENT_ID'], ENV['STRIPE_SECRET'] end>

secrets.yml: <STRIPE_SECRET: sk_test_*************** STRIPE_CONNECT_CLIENT_ID: ca_**************>

xxxxxxxxxxx123 commented 8 years ago

Weird I have the same error! Everything works in development but not in production

lskd commented 8 years ago

@farhansyed9 @johnshencanada , did you guys get this to work out? Sounds like this error code : "API key mode (live or test mode) does not match the client_id mode." found at the bottom here : https://stripe.com/docs/connect/reference#post-deauthorize-error-codes

farhan-syed commented 8 years ago

Yeah I actually was using wrong api keys, so I just deauthorized all keys and got new ones and it worked. On Thu, Jan 14, 2016 at 4:23 PM lskd notifications@github.com wrote:

@farhansyed9 https://github.com/farhansyed9 @johnshencanada https://github.com/johnshencanada , did you guys get this to work out? Sounds like this error code : "API key mode (live or test mode) does not match the client_id mode." found at the bottom here : https://stripe.com/docs/connect/reference#post-deauthorize-error-codes

— Reply to this email directly or view it on GitHub https://github.com/isaacsanders/omniauth-stripe-connect/issues/37#issuecomment-171827681 .

lskd commented 8 years ago

@farhansyed9 awesome, thanks for the followup

farhan-syed commented 8 years ago

No problem, let me know if you have any other issues. On Thu, Jan 14, 2016 at 6:33 PM lskd notifications@github.com wrote:

@farhansyed9 https://github.com/farhansyed9 awesome, thanks for the followup

— Reply to this email directly or view it on GitHub https://github.com/isaacsanders/omniauth-stripe-connect/issues/37#issuecomment-171850820 .