Find your content:

Search form

You are here

error=redirect_uri_mismatch in Salesforce Mobile SDK

 
Share

I have created a hybrid_local mobile app with forcedroid and was working fine with my dev org. But when I tried to run the same app with one of our company sandboxes, it's giving the below error on the emulator even without going to the salesforce log in page for the oauth process,

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

Since I'm still playing around the sdk I believe this is because of some configuration still need to be done(error description also says btw). If anybody know about this or if it's a common mistake please be kind enough to help me out.
To call the sandbox I've configured following things so far.

  1. Altered the remoteAccessConsumerKey at assets\www\bootconfig.json in the app
  2. Altered the remoteAccessConsumerKey at res\values\bootconfig.xml in the sdk library

And for both the organizations the call back url is same. When I connect to dev org it's working fine. Only the difference is the consumerKey. What/ Where I need to do the missing configuration?

Thanks


Attribution to: highfive

Possible Suggestion/Solution #1

In the connected app at salesforce side, the Callback URL was different with the oauthRedirectURI value in the bootconfig.josn. It was having the default value for the oauthRedirectURI and after replacing with the salesforce connected app's Callback URL it's working fine.

But it's confusing how it was working with the default value when I connect to my dev org.


Attribution to: highfive
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34854

My Block Status

My Block Content