Bigcommerce redirect_uri_mismatch oauth2 error

I cannot resolve my rails application using bigcommerce oauth on a production / production server. The same configuration / code works in development with ngrok.

Error message received: (bigcommerce) Authentication Error! invalid_credentials: OAuth2 :: Error, redirect_uri_mismatch: The redirect_uri parameter does not match the registered URI {"error": "redirect_uri_mismatch", "error_description": "The redirect_uri parameter does not match the registered URI"}

This application is sent to the bigcommerce registration server:

https://login.bigcommerce.com/oauth2/authorize?client_id=XXX&context=XXX&redirect_uri=https%3A%2F%2Fexample.com%2Fauth%2Fbigcommerce%2Fcallback&response_type_on__ders_lyders_ly__read_l__reads_lores_ly__read_l__read_l__read_v__read_l__read_v__read

Then the callback of the Bigcommerce call application:

https://example.com/auth/bigcommerce/callback?code=dwud9qmc7wxehy5cd9da6avfy96yp7k&context=XXX&scope=store_v2_orders_read_only+store_v2_products_read_only+store_v2_customers_lystore_onust__+ustore_onust__stust__+ustore_onust__+ustore_onust__+ustore_vust_ly_stust

I am sure that the redirect_uri passed to the login server matches the one I entered in the application callback url (copy).

: gem 'devise', '~ > 2.2.4' gem 'omniauth-bigcommerce' "bigcommerce",   : github = > 'mechatama/bigcommerce-api-ruby',   : branch = > 'oauth'

- ? .

+4
1

uri devise.rb

: setup: (lambda do | env |     request = Rack:: Request.new(env)     env ['omniauth.strategy']. options ['token_params'] = {: redirect_uri = > 'http://localhost:81/users/auth/google_oauth2/callback'}     # http://e3a098b5.ngrok.io/users/auth/google_oauth2/callback  

-1

All Articles