1

I am setting up SF-DX using trial Dev Hub enabled Org and completed below steps:

  1. Set up Force.com IDE2 and Salesforce CLI.
  2. Added SFDX project.

But when i am trying to Authorize my Dev Hub, it authorizes SF org credentials and then redirects to http://localhost:1717/OauthRedirect?code=xxxx&state=xxx

I googled and found that we need to add connected app so i have also:

  1. Added connected app with callback URL http://localhost:1717/

I am not able to understand how this URL will be resolved as, what do I need to to resolve this URL or am I missing on some set up steps.

I am using Windows 7.

Thanks

  • You shouldn't need to add a Connected App to your Dev Hub unless you are planning to use the JWT flow in continuous integration. How are you authorizing your hub? Are you on a locked-down corporate network? – David Reed Feb 14 '18 at 14:32
  • ok. i will remove it but how do i fix localhost:1717/OauthRedirect?code=xxxx&state=xxx redirect issue – sfdeveloper Feb 14 '18 at 14:35
  • >How are you authorizing your hub? Are you on a locked-down corporate network? Please edit your question to add details. – David Reed Feb 14 '18 at 14:36
  • Yes..but would prevent it from authorizing – sfdeveloper Feb 14 '18 at 14:38
2

You don't "need" the Connected App ordinarily, as it usually uses the Global Connected App that Salesforce uses by default. If you're having problems, all the usual software needs to be checked. Your firewall should allow access to localhost:1717, your computer should have a free port at 1717 (meaning, only one copy of the command line should be running at once), you should update your command line to the latest version via sfdx update, or as a final resort, try reinstalling the command line. You might also need the assistance of IT if your firewall, antivirus, or some other configuration is blocking access to localhost.

  • my localhost is up with port with IIS.. my question is how this URL will be resolved i need technical explanation on this.. how my system will recognized this location .. by location i don't only mean localhost but also localhost/OauthRedirect?code=xxxx&state=xxx.. is this handled in salesforce cli – sfdeveloper Feb 15 '18 at 14:02
  • 2
    @sfdeveloper Yes, the CLI sets up an HTTP server on port 1717 (by default, but you can change this), and waits for the callback from the OAuth login. – sfdcfox Feb 15 '18 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.