I am trying to understand authorization code flow using salesforce connected apps.
I have two different Salesforce orgs
I have created a connected app in one Salesforce org which has the following callback URL : https://fruitkiwi--fullcopysb.sandbox.my.salesforce.com/services/authcallback/Fruit_B2B
I have the above url because I was actually connecting another Salesforce org to this org using this connected app and updated the callback url with the url generated in the Auth Provider of the second Salesforce org. The integration between the two orgs is working correctly.
Now, I was trying to test authorization code flow using the same connected app and hit the following url from the browser:
But, I am getting the following error message
Now, if the change the callback url in the connected app to something like the following then the authorization code generation from the browser is working correctly.
https://login.salesforce.com/services/oauth2/success
Now, the request that I am hitting from the browser is
I was trying to understand why it is working with the below URL and not with the one above?