You need to sign in to do that
Don't have an account?

Any Sample code for connecting two ORGs with OAUTH2 without re-logging in
I'm attempting to authenticate between two ORGs using OAuth2.
It seems to be working OK, except after I authenticate the remote ORG, I have to log-back-in to the client ORG for the callback to record the access token.
I've attempted adding the existing session ID onto the call back URI, but it gets lost.
string sessionId = UserInfo.getSessionId(); string OpenCallback = service.Redirect_URI__c+'?access_token=' + sessionId; callbackUrl = EncodingUtil.urlEncode(OpenCallback, 'UTF-8');
Has anyone else been able to authenticate between ORGs this way?
Thanks