login Commands

Commands to log in to an environment.

login functions

Log in to Salesforce Functions.

Description for login functions

This step is required to develop or deploy Salesforce Functions.

Examples for login functions

Log in to Salesforce Functions:

Usage

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:

Log in and specify the org alias and URL, set as default org and default Dev Hub, and format output as JSON:

Usage

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