From cdf5207fcf18d392ccc7d46916b6ff11a129ee17 Mon Sep 17 00:00:00 2001 From: svc-cli-bot Date: Fri, 22 Mar 2024 20:53:34 +0000 Subject: [PATCH] chore(release): 3.3.27 [skip ci] --- CHANGELOG.md | 6 + README.md | 450 +-------------------------------------------------- package.json | 2 +- 3 files changed, 9 insertions(+), 449 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09042c37..0ff14731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [3.3.27](https://github.com/salesforcecli/plugin-auth/compare/3.3.26...3.3.27) (2024-03-22) + +### Bug Fixes + +- bump salesforce/core ([#975](https://github.com/salesforcecli/plugin-auth/issues/975)) ([e8ce3f7](https://github.com/salesforcecli/plugin-auth/commit/e8ce3f70baeaffaafaf3778ce6d34fc0476e8b5d)) + ## [3.3.26](https://github.com/salesforcecli/plugin-auth/compare/3.3.25...3.3.26) (2024-03-17) ### Bug Fixes diff --git a/README.md b/README.md index e99b58b2..5e891540 100644 --- a/README.md +++ b/README.md @@ -70,454 +70,8 @@ sfdx plugins -- [`sf org list auth`](#sf-org-list-auth) -- [`sf org login access-token`](#sf-org-login-access-token) -- [`sf org login device`](#sf-org-login-device) -- [`sf org login jwt`](#sf-org-login-jwt) -- [`sf org login sfdx-url`](#sf-org-login-sfdx-url) -- [`sf org login web`](#sf-org-login-web) -- [`sf org logout`](#sf-org-logout) +# Command Topics -## `sf org list auth` - -List authorization information about the orgs you created or logged into. - -``` -USAGE - $ sf org list auth [--json] - -GLOBAL FLAGS - --json Format output as json. - -DESCRIPTION - List authorization information about the orgs you created or logged into. - - This command uses local authorization information that Salesforce CLI caches when you create a scratch org or log into - an org. The command doesn't actually connect to the orgs to verify that they're still active. As a result, this - command executes very quickly. If you want to view live information about your authorized orgs, such as their - connection status, use the "org list" command. - -ALIASES - $ sf force auth list - $ sf auth list - -EXAMPLES - List local authorization information about your orgs: - - $ sf org list auth -``` - -_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.26/src/commands/org/list/auth.ts)_ - -## `sf org login access-token` - -Authorize an org using an existing Salesforce access token. - -``` -USAGE - $ sf org login access-token -r [--json] [-d] [-s] [-a ] [-p] - -FLAGS - -a, --alias= Alias for the org. - -d, --set-default-dev-hub Set the authenticated org as the default Dev Hub. - -p, --no-prompt Don't prompt for confirmation. - -r, --instance-url= (required) URL of the instance that the org lives on. - -s, --set-default Set the authenticated org as the default that all org-related commands run against. - -GLOBAL FLAGS - --json Format output as json. - -DESCRIPTION - Authorize an org using an existing Salesforce access token. - - By default, the command runs interactively and asks you for the access token. If you previously authorized the org, - the command prompts whether you want to overwrite the local file. Specify --no-prompt to not be prompted. - - To use the command in a CI/CD script, set the SFDX_ACCESS_TOKEN environment variable to the access token. Then run the - command with the --no-prompt parameter. - -ALIASES - $ sf force auth accesstoken store - $ sf auth accesstoken store - -EXAMPLES - Authorize an org on https://mycompany.my.salesforce.com; the command prompts you for the access token: - - $ sf org login access-token --instance-url https://mycompany.my.salesforce.com - - Authorize the org without being prompted; you must have previously set the SF_ACCESS_TOKEN environment variable to - the access token: - - $ sf org login access-token --instance-url https://dev-hub.my.salesforce.com --no-prompt - -FLAG DESCRIPTIONS - -r, --instance-url= URL of the instance that the org lives on. - - If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file. - - To specify a My Domain URL, use the format "https://.my.salesforce.com". - - To specify a sandbox, set --instance-url to "https://--.sandbox.my.salesforce.com". -``` - -_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.26/src/commands/org/login/access-token.ts)_ - -## `sf org login device` - -Authorize an org using a device code. - -``` -USAGE - $ sf org login device [--json] [-i ] [-r ] [-d] [-s] [-a ] - -FLAGS - -a, --alias= Alias for the org. - -d, --set-default-dev-hub Set the authenticated org as the default Dev Hub. - -i, --client-id= OAuth client ID (also called consumer key) of your custom connected app. - -r, --instance-url= URL of the instance that the org lives on. - -s, --set-default Set the authenticated org as the default that all org-related commands run against. - -GLOBAL FLAGS - --json Format output as json. - -DESCRIPTION - Authorize an org using a device code. - - Use this command to allow a device to connect to an org. - - When you run this command, it first displays an 8-digit device code and the URL for verifying the code on your org. - The default instance URL is https://login.salesforce.com, so if the org you're authorizing is on a different instance, - use the --instance-url. The command waits while you complete the verification. Open a browser and navigate to the - displayed verification URL, enter the code, then click Connect. If you aren't already logged into your org, log in, - and then you're prompted to allow the device to connect to the org. After you successfully authorize the org, you can - close the browser window. - -ALIASES - $ sf force auth device login - $ sf auth device login - -EXAMPLES - Authorize an org using a device code, give the org the alias TestOrg1, and set it as your default Dev Hub org: - - $ sf org login device --set-default-dev-hub --alias TestOrg1 - - Authorize an org in which you've created a custom connected app with the specified client ID (consumer key): - - $ sf org login device --client-id - - Authorize a sandbox org with the specified instance URL: - - $ sf org login device --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com - -FLAG DESCRIPTIONS - -r, --instance-url= URL of the instance that the org lives on. - - If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file. - - To specify a My Domain URL, use the format "https://.my.salesforce.com". - - To specify a sandbox, set --instance-url to "https://--.sandbox.my.salesforce.com". -``` - -_See code: [src/commands/org/login/device.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.26/src/commands/org/login/device.ts)_ - -## `sf org login jwt` - -Log in to a Salesforce org using a JSON web token (JWT). - -``` -USAGE - $ sf org login jwt -o -f -i [--json] [-r ] [-d] [-s] [-a ] - -FLAGS - -a, --alias= Alias for the org. - -d, --set-default-dev-hub Set the authenticated org as the default Dev Hub. - -f, --jwt-key-file= (required) Path to a file containing the private key. - -i, --client-id= (required) OAuth client ID (also called consumer key) of your custom connected app. - -o, --username= (required) Username of the user logging in. - -r, --instance-url= URL of the instance that the org lives on. - -s, --set-default Set the authenticated org as the default that all org-related commands run against. - -GLOBAL FLAGS - --json Format output as json. - -DESCRIPTION - Log in to a Salesforce org using a JSON web token (JWT). - - Use this command in automated environments where you can’t interactively log in with a browser, such as in CI/CD - scripts. - - Logging into an org authorizes the CLI to run other commands that connect to that org, such as deploying or retrieving - a project. You can log into many types of orgs, such as sandboxes, Dev Hubs, Env Hubs, production orgs, and scratch - orgs. - - Complete these steps before you run this command: - - 1. Create a digital certificate (also called digital signature) and the private key to sign the certificate. You can - use your own key and certificate issued by a certification authority. Or use OpenSSL to create a key and a self-signed - digital certificate. - 2. Store the private key in a file on your computer. When you run this command, you set the --jwt-key-file flag to - this file. - 3. Create a custom connected app in your org using the digital certificate. Make note of the consumer key (also called - client id) that’s generated for you. Be sure the username of the user logging in is approved to use the connected app. - When you run this command, you set the --client-id flag to the consumer key. - - See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm for more - information. - - We recommend that you set an alias when you log into an org. Aliases make it easy to later reference this org when - running commands that require it. If you don’t set an alias, you use the username that you specified when you logged - in to the org. If you run multiple commands that reference the same org, consider setting the org as your default. Use - --set-default for your default scratch org or sandbox, or --set-default-dev-hub for your default Dev Hub. - -ALIASES - $ sf force auth jwt grant - $ sf auth jwt grant - -EXAMPLES - Log into an org with username jdoe@example.org and on the default instance URL (https://login.salesforce.com). The - private key is stored in the file /Users/jdoe/JWT/server.key and the command uses the connected app with consumer - key (client id) 04580y4051234051. - - $ sf org login jwt --username jdoe@example.org --jwt-key-file /Users/jdoe/JWT/server.key --client-id \ - 04580y4051234051 - - Set the org as the default and give it an alias: - - $ sf org login jwt --username jdoe@example.org --jwt-key-file /Users/jdoe/JWT/server.key --client-id \ - 04580y4051234051 --alias ci-org --set-default - - Set the org as the default Dev Hub and give it an alias: - - $ sf org login jwt --username jdoe@example.org --jwt-key-file /Users/jdoe/JWT/server.key --client-id \ - 04580y4051234051 --alias ci-dev-hub --set-default-dev-hub - - Log in to a sandbox using URL https://MyDomainName--SandboxName.sandbox.my.salesforce.com: - - $ sf org login jwt --username jdoe@example.org --jwt-key-file /Users/jdoe/JWT/server.key --client-id \ - 04580y4051234051 --alias ci-org --set-default --instance-url \ - https://MyDomainName--SandboxName.sandbox.my.salesforce.com - -FLAG DESCRIPTIONS - -r, --instance-url= URL of the instance that the org lives on. - - If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file. - - To specify a My Domain URL, use the format "https://.my.salesforce.com". - - To specify a sandbox, set --instance-url to "https://--.sandbox.my.salesforce.com". -``` - -_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.26/src/commands/org/login/jwt.ts)_ - -## `sf org login sfdx-url` - -Authorize an org using a Salesforce DX authorization URL stored in a file or through standard input (stdin). - -``` -USAGE - $ sf org login sfdx-url [--json] [-f ] [-u ] [-d] [-s] [-a ] - -FLAGS - -a, --alias= Alias for the org. - -d, --set-default-dev-hub Set the authenticated org as the default Dev Hub. - -f, --sfdx-url-file= Path to a file that contains the Salesforce DX authorization URL. - -s, --set-default Set the authenticated org as the default that all org-related commands run against. - -u, --sfdx-url-stdin= Pipe the Salesforce DX authorization URL through standard input (stdin). - -GLOBAL FLAGS - --json Format output as json. - -DESCRIPTION - Authorize an org using a Salesforce DX authorization URL stored in a file or through standard input (stdin). - - The Salesforce DX (SFDX) authorization URL must have the format - "force://::@". 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 three options when creating the authorization file. The easiest option is to redirect the output of the "sf - org display --verbose --json" command into a file. For example, using an org with alias my-org that you've already - authorized: - - $ sf org display --target-org my-org --verbose --json > authFile.json - - 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: - - $ sf org login sfdx-url --sfdx-url-file authFile.json - - NOTE: The "sf org display --verbose" command displays the refresh token only for orgs authorized with the web server - flow, and not the JWT bearer flow. - - You can also 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. - - Alternatively, you can pipe the SFDX authorization URL through standard input by specifying the --sfdx-url-stdin flag. - -ALIASES - $ sf force auth sfdxurl store - $ sf auth sfdxurl store - -EXAMPLES - Authorize an org using the SFDX authorization URL in the files/authFile.json file: - - $ sf org login sfdx-url --sfdx-url-file files/authFile.json - - Similar to previous example, but set the org as your default and give it an alias MyDefaultOrg: - - $ sf org login sfdx-url --sfdx-url-file files/authFile.json --set-default --alias MyDefaultOrg - - Pipe the SFDX authorization URL from stdin: - - $ echo url | sf org login sfdx-url --sfdx-url-stdin -``` - -_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.26/src/commands/org/login/sfdx-url.ts)_ - -## `sf org login web` - -Log in to a Salesforce org using the web server flow. - -``` -USAGE - $ sf org login web [--json] [-b chrome|edge|firefox] [-i ] [-r ] [-d] [-s] [-a ] - -FLAGS - -a, --alias= Alias for the org. - -b, --browser=