+ Start a Discussion

Oauth between Salesforce orgs.

I am trying to connect using Salesforce orgs.
I have done all the set up of creating connected apps and Remote sites.

I have created a visualforce page and controller in main org.

My VF page have two input fields org name and Client Consumer Org .On click "Authorize" button which makes a call to controller and redirects to the page with URl "https://login.salesforce.com/services/oauth2/authorize".

I received the code and passing it to get the refresh token and but no success with it.

Experts: Can you please help me in how to connect these orgs