Skip to content

Instantly share code, notes, and snippets.

@cmouse
Created June 3, 2012 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmouse/2865320 to your computer and use it in GitHub Desktop.
Save cmouse/2865320 to your computer and use it in GitHub Desktop.
option :client_options, {
:site => 'https://manage.stripe.com',
:authorize_url => '/oauth/authorize',
:token_url => '/oauth/token',
}
option :token_params, {
:parse => :query
}
option :access_token_options, {
:header_format => "OAuth %s",
:param_name => 'access_token'
}
option :authorize_params, {
:header_format => "Bearer %s(:client_secret)"
}
def request_phase
authorize_params[:headers] = {:authorize => "Bearer #{client.secret}"}
redirect client.auth_code.authorize_url({:redirect_uri => callback_url}.merge(authorize_params))
end
@coderforhire
Copy link

stripeplatform) Callback phase initiated.
(stripeplatform) Authentication failure! invalid_credentials: OAuth2::Error, :
{
"error": "invalid_client",
"error_description": "No authentication credentials were provided. Send your secret API key in the Authorization header using the Bearer authentication method"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment