5

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

5
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.

2
  • 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 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
0

Try changing the port in your address bar to from 1717 to 7717. I can't speak to why this happens but it is the solution I have found works.

0

I was facing the same issue, but then I tried below and got solved.

  1. Go to -> sfdx-project.json file in your vs code
  2. Add "oauthLocalPort" : 1717

This worked for me just now.

enter image description here

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