USAGE
$ sfp org login [--json] [-f <value>] [-u <value>] [--access-token <value> --instance-url <value>] [-o
<value> --server] [--default-devhub ] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>]
[-d] [-s] [-w] [-a <value>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
FLAGS
-a, --alias=<value> Alias for the org.
-d, --set-default-dev-hub Set the authenticated org as the default Dev Hub.
-e, --email=<value> Email address for authenticated user. Ignored if --application-token is provided. Can
be set via SFP_SERVER_USER env var.
-f, --url-file=<value> Path to a file that contains the Salesforce DX authorization URL.
-o, --username=<value> The username of the org to be fetched from the server, when server mode is used
-s, --set-default Set the authenticated org as the default that all org-related commands run against.
-t, --application-token=<value> Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
(CLI flags take precedence over env vars).
-u, --url-stdin=<value> Specify '-' as this flag's value to pipe the Salesforce DX authorization URL through
standard input (stdin).
-w, --write-file Write the results of the org into org_details.json, Please note this is sensitive and
contains access token, so please
ensure it is deleted
--access-token=<value> Salesforce access token for direct authentication. Use this with --instance-url to
authenticate using a pre-generated access token instead of an sfdxAuthUrl.
--default-devhub Fetch the default DevHub from the server instead of specifying a username
--instance-url=<value> Salesforce instance URL (e.g., https://mycompany.my.salesforce.com). Required when
using --access-token.
--loglevel=<option> [default: info] logging level for this command invocation
<options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
--repository=<value> The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
for Azure DevOps
--server Fetch authentication URL from the sfp server
--sfp-server-url=<value> URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
config:set server-url
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Authenticate to an org using auth url either from a file or from sfp server,
he sf authorization URL must have the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". NOTE:
The SFDX authorization URL uses the "force" protocol, and not "http" or "https". Also, the "instanceUrl" inside the
SFDX authorization URL doesn't include the protocol ("https://").
You have two options when creating the authorization file.
You can create a JSON file that has a top-level property named sfdxAuthUrl whose value is the authorization URL.
Finally, you can create a normal text file that includes just the URL and nothing else.
The resulting JSON file contains the URL in the "sfdxAuthUrl" property of the "result" object. You can then reference
the file when running this command:
$ sfp org:login:url --url-file authFile.json
Alternatively, you can pipe the SFDX authorization URL through standard input by using the --url-stdin flag and
providing the '-' character as the value.
ALIASES
$ sfp org login url
EXAMPLES
$ sfp org login --url-file files/authFile.json
$ sfp org login --access-token <token> --instance-url https://myorg.my.salesforce.com --alias myorg
$ sfp org login --server --username user@example.com --sfp-server-url <url> --email admin@example.com
$ sfp org login --server --default-devhub --sfp-server-url <url> --email admin@example.com