isaacsanders / omniauth-stripe-connect

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

invalid_client: No authentication credentials were provided. #2

Closed xdmx closed 12 years ago

xdmx commented 12 years ago

Hi Isaac, now the auth works, but the problem is on the token retrieve part because there isn't the header param for the auth:

Error:

invalid_client: No authentication credentials were provided. Send your secret API key in the Authorization header using the Bearer authentication method { "error_description": "No authentication credentials were provided. Send your secret API key in the Authorization header using the Bearer authentication method", "error": "invalid_client" }

isaacsanders commented 12 years ago

Can you post what the relevant HTTP requests look like? Please redact sensitive information.

xdmx commented 12 years ago

You can find the required header at the Stripe docs: https://stripe.com/docs/tutorials/platform (end of the page). Which is:

params = { :headers => {'Authorization' => "Bearer #{settings.api_key}"} }

But, as they say there, the current oauth2 gem doesn't support setting headers and the github version must be used

How did you make Stripe Platform working on your configuration/pc/app?

isaacsanders commented 12 years ago

I do not have it working. I am still working on this, and it is in beta. I am sorry that I did not say that.

However, the OAuth2 gem, by default, uses that format.

You will find the relevant code in lib/oauth2/access_token.rb of the OAuth2 gem.

isaacsanders commented 12 years ago

I made some changes. Stripe does have a Secret that is required for requests

isaacsanders commented 12 years ago

Okay. I think we are on the same page now.

I just got to that point (using the secret). I have narrowed the error to line 132 in lib/oauth2/client.rb

isaacsanders commented 12 years ago

I just saw what you were talking about. I sent a pull request to omniauth-oauth2 to update their oauth2 version dependency.

Thanks!

xdmx commented 12 years ago

great! :)