Error Salesforce = redirect_uri_mismatch & error_description = redirect_uri

I tried the login functions using "omnioauth-salesforce" using login for Salesforce developers, I mention the callback http://localhost:3000/auth/salesforce/callback inside the connected application

in my devise.rb

 config.omniauth :salesforce, "consumer_id","consumer_secret" 

when I click on the login link /users/auth/salesforce/ I get this error

errors = redirect_uri_mismatch & error_description = redirect_uri% 20must% 20match% 20configuration

+5
source share
2 answers

You are using localhost: 3000 in the connected application for the callback URL in salesforce. This will not work because salesforce does not recognize the localhost of your local computer. You should use static ip as

" https://112.167.1.64 " instead of https: // localhost: 3000 ".

0
source

Be sure to include REDIRECT_URI as the request parameter in the authorization / login redirection URL and make sure that it matches the one specified in the connected application.

0
source

Source: https://habr.com/ru/post/1201238/


All Articles