Newer Version Available
login Commands
Commands to log in to an environment.
login (Deprecated)
The command login has been deprecated and will be removed in v58.0 or later. Log interactively into an environment.
Description for login
Logging into an environment authorizes the CLI to run other commands that connect to that environment.
Examples for login
Log in interactively:
1sf loginUsage
- sf login
- [--json]
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
login functions
Description for login functions
This step is required to develop or deploy Salesforce Functions.
Examples for login functions
Log in to Salesforce Functions:
1sf login functionsUsage
- sf login functions
- [--json]
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
login functions jwt
Login using JWT instead of default web-based flow. This will authenticate you with both sf and Salesforce Functions.
Description for login functions jwt
Use this command when executing from a script.
Examples for login functions jwt
Log in using JWT:
1sf login functions jwt --username example@username.org --keyfile file.key --clientid 123456Log in and specify the org alias and URL, set as default org and default Dev Hub, and format output as JSON:
1sf login functions jwt --username example@username.org --keyfile file.key --clientid 123456 --alias org-alias --set-default --set-default-dev-hub --instance-url https://path/to/instance --jsonUsage
- sf login functions jwt
- [--json]
- -u USERNAME
- -f KEYFILE
- -i CLIENTID
- [-l INSTANCE-URL]
- [-a ALIAS]
- [-d]
- [-v]
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -u | --username USERNAME
- Required
-
Authentication username.
- Type: option
- -f | --keyfile KEYFILE
- Required
-
Path to JWT keyfile.
- Type: option
- -i | --clientid CLIENTID
- Required
-
OAuth client ID.
- Type: option
- -l | --instance-url INSTANCE-URL
- Optional
-
The login URL of the instance the org lives on.
- Type: option
- -a | --alias ALIAS
- Optional
-
Alias for the org.
- Type: option
- -d | --set-default
- Optional
-
Set the org as the default that all org-related commands run against.
- Type: boolean
- -v | --set-default-dev-hub
- Optional
-
Set the org as the default Dev Hub for scratch org creation.
- Type: boolean