Skip to main content
I properly installed CLI. In a command window, I enter:

sfdx force:auth:web:login -d -a DevHub

in order to log in to the trial Dev Hub that I created. The aforementioned command opens the Salesforce login page in the web browser, so I log in using my Developer Hub Trial Org credentials and click Allow. After that, web browser show me an error: "This site can't be reached. localhost took too long to respond".

This is the URL that Salesforce use after I authenticate in the browser: http://localhost:1717/OauthRedirect?code=aPrxbOND3gL_2LbSR7rKPdvD0XBVk2YpErl3pphY2f3xvZ1wf5SSPJByDleRLPMtzCQWnNGAdg%3D%3D&state=f2f8254fac23

I don't know what happen.

Salesforce CLI: auth web login issue

User-added image

User-added image
53 risposte
  1. 18 nov 2017, 17:29
    OK Lets dry below and see if it works

    Authorize the CLI to work with your DevHub by typing:

    sfdx force:auth:web:login -h

    This will automatically open your browser and prompt you to login to the dev hub. Use the credentials that you used to create the Salesforce DX authorized dev hub. Click Allow when the Oauth Flow prompts you to.

    Once you’ve gone through this authorization process you can set up an alias using the following command

    sfdx force:auth:web:login -d -a DevHub

    You should see something like:

    Successfully authorized <your-username> with org id 00B1I000000L9r3UCY

    You may now close the browser

    Now you should be able to open the dev hub using this

    sfdx force:org:open -u DevHub

    Let me know if this works