web Commands
auth:web:login
Help for auth:web:login
If you specify an --instanceurl value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file. To specify a My Domain URL, use the format MyDomainName.my.salesforce.com (not MyDomainName.lightning.force.com). To log in to a sandbox, set --instanceurl to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
Examples for auth:web:login
sfdx auth:web:login -a TestOrg1
sfdx auth:web:login -i <OAuth client id>
sfdx auth:web:login -r https://MyDomainName--SandboxName.sandbox.my.salesforce.com
Command Syntax
- sfdx auth:web:login
- [--json]
- [--loglevel LOGLEVEL]
- [-i CLIENTID]
- [-r INSTANCEURL]
- [-d]
- [-s]
- [-a SETALIAS]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -i | --clientid CLIENTID
- Optional
-
OAuth client ID (sometimes called the consumer key).
- Type: string
- -r | --instanceurl INSTANCEURL
- Optional
-
The login URL of the instance the org lives on.
- Type: url
- -d | --setdefaultdevhubusername
- Optional
-
Set the authenticated org as the default dev hub org for scratch org creation.
- Type: boolean
- -s | --setdefaultusername
- Optional
-
Set the authenticated org as the default username that all commands run against.
- Type: boolean
- -a | --setalias SETALIAS
- Optional
-
Set an alias for the authenticated org.
- Type: string