question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SFDX: Authorize an Org (Allow Selection of Org Login Url)

See original GitHub issue

Summary

Difficult / impossible to follow the wiki: https://github.com/forcedotcom/salesforcedx-vscode/wiki/Develop-Against-Any-Org-in-Visual-Studio-Code

to Auth to a Sandbox from within VSCode

Steps To Reproduce:

  1. Follow the wiki article
  2. run SFDX: Authorize an Org command in VSCode
  3. enter a sandbox username
  4. it takes you to login.salesforce.com

Expected result

either it intelligently selects the domain, or switching the domain works

Actual result

  • tried using custom domain without much luck
  • tired passing argument -r https://test.salesforce.com without luck

Additional information

VS Code Version:

SFDX CLI Version:

OS and version:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
amphrocommented, Sep 5, 2018

@evanmcd The error Unknown config name ... comes from using sfdx force:config:set. You can not use sfdcLoginUrl as a config variable. Instead, that needs to go in your sfdx-project.json file. If you want to set a config var, you can try sfdx force:config:set instanceUrl=https://test.salesforce.com. I think the auth commands will use the following order:

  1. --instanceurl flag on the commands
  2. sfdcLoginUrl in the sfdx-project.json file
  3. instanceUrl in force:config:set
  4. SFDX_INSTANCE_URL envvar
2reactions
ruthemmanuellecommented, Aug 31, 2018

@evanmcd - Is the sfdcLoginUrl property at the top level of your sfdx-project.json file? For example:

{
  "packageDirectories": [
    {
      "path": "force-app",
      "default": true
    },
    {
      "path": "unpackaged"
    },
    {
      "path": "utils"
    }
  ],
  "namespace": "",
  "sfdcLoginUrl": "https://test.salesforce.com",
  "sourceApiVersion": "44.0"
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

SFDX: Authorize an Org in Visual code studio.
Hii all, I am facing issue in SFDX: Authorization. As"SFDX: Authorize an Org " Command is not showing in my option. What to...
Read more >
SFDX: Authorize an Org hangs after login attempt
I login using the login I've been using successfully since yesterday, I get the prompt to Allow Access, and it just hangs. I...
Read more >
Salesforce DX Org Authorizations - Amplify DX Documentation
Authorize the org whose auth URL you need using sfdx force:auth:web:login -a OrgAlias . · Log in with your credentials and authorize the...
Read more >
Setup for Salesforce CLI authorization of an Org through CLI ...
Use the sfdx commands to authorize an organization through VS code. ... Use -a in your auth command to login to the default...
Read more >
SFDX Org Authorization ☑️ - benahm - Medium
In order to authorize an org, just run the following command. sfdx ... you'll get the page below asking you to allow access...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found