Reputation: 55
I am using omniauth-bigcommerce gem
Response is getting from big commerce after auth callback process. In the params context is missing which is needed to get access token through post request
{"code"=>"nf0cayio41l0ws4vtpfyl18hwbd3v13",
"scope"=>"users_basic_information store_v2_products store_v2_information",
"state"=>"b599054a60ecb7d7a8f0987bef3eb2c29b5631c40266b92c",
"controller"=>"home",
"action"=>"after_authantication_create",
"provider"=>"bigcommerce"}
EDIT:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :bigcommerce, "MY_KEY", "MY_SECRET",
{
scope: "users_basic_information store_v2_products store_v2_information",
client_options: {
site: 'login.bigcommerce.com';
}
}
end
Upvotes: 1
Views: 337
Reputation: 1541
Bigcommerce have just moved to the basic auth to omini auth , So still there are some issues with there API's. I have contacted them and got reply that they will fix all issues soon.
Upvotes: 4
Reputation: 9747
Everything looks OKAY. I think you are expecting the desired response at wrong place.
In your callback action, you can get the desired token as follow:
auth = request.env['omniauth.auth'] # All required details are in this Auth Hash
token = auth[:credentials][:token]
You may want to have a look on Auth hash Schema for better understanding.
Upvotes: 2