@salesforce/plugin-auth 2.8.17 → 2.8.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +270 -438
- package/oclif.manifest.json +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -70,615 +70,447 @@ sfdx plugins
|
|
|
70
70
|
|
|
71
71
|
<!-- commands -->
|
|
72
72
|
|
|
73
|
-
- [`sfdx
|
|
74
|
-
- [`sfdx
|
|
75
|
-
- [`sfdx
|
|
76
|
-
- [`sfdx
|
|
77
|
-
- [`sfdx
|
|
78
|
-
- [`sfdx
|
|
79
|
-
- [`sfdx
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- [`sfdx force:auth:logout [-a] [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceauthlogout--a--p--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
85
|
-
- [`sfdx force:auth:sfdxurl:store -f <filepath> [-d] [-s] [-a <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceauthsfdxurlstore--f-filepath--d--s--a-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
86
|
-
- [`sfdx force:auth:web:login [-i <string>] [-r <url>] [-d] [-s] [-a <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceauthweblogin--i-string--r-url--d--s--a-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
87
|
-
|
|
88
|
-
## `sfdx auth:accesstoken:store -r <url> [-d] [-s] [-a <string>] [-p] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
89
|
-
|
|
90
|
-
authorize an org using an existing Salesforce access token
|
|
73
|
+
- [`sfdx org:list:auth`](#sfdx-orglistauth)
|
|
74
|
+
- [`sfdx org:login:access-token`](#sfdx-orgloginaccess-token)
|
|
75
|
+
- [`sfdx org:login:device`](#sfdx-orglogindevice)
|
|
76
|
+
- [`sfdx org:login:jwt`](#sfdx-orgloginjwt)
|
|
77
|
+
- [`sfdx org:login:sfdx-url`](#sfdx-orgloginsfdx-url)
|
|
78
|
+
- [`sfdx org:login:web`](#sfdx-orgloginweb)
|
|
79
|
+
- [`sfdx org:logout`](#sfdx-orglogout)
|
|
80
|
+
|
|
81
|
+
## `sfdx org:list:auth`
|
|
82
|
+
|
|
83
|
+
List authorization information about the orgs you created or logged into.
|
|
91
84
|
|
|
92
85
|
```
|
|
93
86
|
USAGE
|
|
94
|
-
$ sfdx
|
|
95
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
87
|
+
$ sfdx org:list:auth [--json]
|
|
96
88
|
|
|
97
|
-
FLAGS
|
|
98
|
-
|
|
99
|
-
org
|
|
100
|
-
-d, --setdefaultdevhubusername set the authenticated org as the
|
|
101
|
-
default dev hub org for scratch org
|
|
102
|
-
creation
|
|
103
|
-
-p, --noprompt do not prompt for confirmation
|
|
104
|
-
-r, --instanceurl=<value> (required) the login URL of the
|
|
105
|
-
instance the org lives on
|
|
106
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
107
|
-
default username that all commands
|
|
108
|
-
run against
|
|
109
|
-
--json format output as json
|
|
110
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
111
|
-
this command invocation
|
|
89
|
+
GLOBAL FLAGS
|
|
90
|
+
--json Format output as json.
|
|
112
91
|
|
|
113
92
|
DESCRIPTION
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
By default, the command runs interactively and asks you for the access token. If you previously authorized the org,
|
|
117
|
-
the command prompts whether you want to overwrite the local file. Specify --noprompt to not be prompted.
|
|
93
|
+
List authorization information about the orgs you created or logged into.
|
|
118
94
|
|
|
119
|
-
|
|
120
|
-
command
|
|
95
|
+
This command uses local authorization information that Salesforce CLI caches when you create a scratch org or log into
|
|
96
|
+
an org. The command doesn't actually connect to the orgs to verify that they're still active. As a result, this
|
|
97
|
+
command executes very quickly. If you want to view live information about your authorized orgs, such as their
|
|
98
|
+
connection status, use the "org list" command.
|
|
121
99
|
|
|
122
100
|
ALIASES
|
|
123
|
-
$ sfdx force:auth:
|
|
101
|
+
$ sfdx force:auth:list
|
|
102
|
+
$ sfdx auth:list
|
|
124
103
|
|
|
125
104
|
EXAMPLES
|
|
126
|
-
|
|
105
|
+
List local authorization information about your orgs:
|
|
127
106
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
$ sfdx auth:accesstoken:store --instanceurl https://dev-hub.my.salesforce.com --noprompt
|
|
107
|
+
$ sfdx org:list:auth
|
|
131
108
|
```
|
|
132
109
|
|
|
133
|
-
_See code: [src/commands/
|
|
110
|
+
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/2.8.19/src/commands/org/list/auth.ts)_
|
|
134
111
|
|
|
135
|
-
## `sfdx
|
|
112
|
+
## `sfdx org:login:access-token`
|
|
136
113
|
|
|
137
|
-
|
|
114
|
+
Authorize an org using an existing Salesforce access token.
|
|
138
115
|
|
|
139
116
|
```
|
|
140
117
|
USAGE
|
|
141
|
-
$ sfdx
|
|
142
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
118
|
+
$ sfdx org:login:access-token -r <value> [--json] [-d] [-s] [-a <value>] [-p]
|
|
143
119
|
|
|
144
120
|
FLAGS
|
|
145
|
-
-a, --
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
org lives on
|
|
154
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
155
|
-
default username that all commands
|
|
156
|
-
run against
|
|
157
|
-
--json format output as json
|
|
158
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
159
|
-
this command invocation
|
|
121
|
+
-a, --alias=<value> Alias for the org.
|
|
122
|
+
-d, --set-default-dev-hub Set the authenticated org as the default Dev Hub.
|
|
123
|
+
-p, --no-prompt Don't prompt for confirmation.
|
|
124
|
+
-r, --instance-url=<value> (required) URL of the instance that the org lives on.
|
|
125
|
+
-s, --set-default Set the authenticated org as the default that all org-related commands run against.
|
|
126
|
+
|
|
127
|
+
GLOBAL FLAGS
|
|
128
|
+
--json Format output as json.
|
|
160
129
|
|
|
161
130
|
DESCRIPTION
|
|
162
|
-
|
|
131
|
+
Authorize an org using an existing Salesforce access token.
|
|
163
132
|
|
|
164
|
-
|
|
165
|
-
you
|
|
133
|
+
By default, the command runs interactively and asks you for the access token. If you previously authorized the org,
|
|
134
|
+
the command prompts whether you want to overwrite the local file. Specify --no-prompt to not be prompted.
|
|
135
|
+
|
|
136
|
+
To use the command in a CI/CD script, set the SFDX_ACCESS_TOKEN environment variable to the access token. Then run the
|
|
137
|
+
command with the --no-prompt parameter.
|
|
166
138
|
|
|
167
139
|
ALIASES
|
|
168
|
-
$ sfdx force:auth:
|
|
140
|
+
$ sfdx force:auth:accesstoken:store
|
|
141
|
+
$ sfdx auth:accesstoken:store
|
|
169
142
|
|
|
170
143
|
EXAMPLES
|
|
171
|
-
|
|
144
|
+
Authorize an org on https://mycompany.my.salesforce.com; the command prompts you for the access token:
|
|
172
145
|
|
|
173
|
-
|
|
146
|
+
$ sfdx org:login:access-token --instance-url https://mycompany.my.salesforce.com
|
|
174
147
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
_See code: [src/commands/auth/device/login.ts](https://github.com/salesforcecli/plugin-auth/blob/v2.2.2/src/commands/auth/device/login.ts)_
|
|
179
|
-
|
|
180
|
-
## `sfdx auth:jwt:grant -u <string> -f <filepath> -i <string> [-r <url>] [-d] [-s] [-a <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
181
|
-
|
|
182
|
-
authorize an org using the JWT flow
|
|
148
|
+
Authorize the org without being prompted; you must have previously set the SFDX_ACCESS_TOKEN environment variable to
|
|
149
|
+
the access token:
|
|
183
150
|
|
|
184
|
-
|
|
185
|
-
USAGE
|
|
186
|
-
$ sfdx auth:jwt:grant -u <string> -f <filepath> -i <string> [-r <url>] [-d] [-s] [-a <string>] [--json]
|
|
187
|
-
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
151
|
+
$ sfdx org:login:access-token --instance-url https://dev-hub.my.salesforce.com --no-prompt
|
|
188
152
|
|
|
189
|
-
|
|
190
|
-
-
|
|
191
|
-
org
|
|
192
|
-
-d, --setdefaultdevhubusername set the authenticated org as the
|
|
193
|
-
default dev hub org for scratch org
|
|
194
|
-
creation
|
|
195
|
-
-f, --jwtkeyfile=<value> (required) path to a file containing
|
|
196
|
-
the private key
|
|
197
|
-
-i, --clientid=<value> (required) OAuth client ID
|
|
198
|
-
(sometimes called the consumer key)
|
|
199
|
-
-r, --instanceurl=<value> the login URL of the instance the
|
|
200
|
-
org lives on
|
|
201
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
202
|
-
default username that all commands
|
|
203
|
-
run against
|
|
204
|
-
-u, --username=<value> (required) authentication username
|
|
205
|
-
--json format output as json
|
|
206
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
207
|
-
this command invocation
|
|
153
|
+
FLAG DESCRIPTIONS
|
|
154
|
+
-r, --instance-url=<value> URL of the instance that the org lives on.
|
|
208
155
|
|
|
209
|
-
|
|
210
|
-
authorize an org using the JWT flow
|
|
211
|
-
|
|
212
|
-
Use a certificate associated with your private key that has been uploaded to a personal connected app.
|
|
213
|
-
|
|
214
|
-
If you specify an --instanceurl value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file. To
|
|
215
|
-
specify a My Domain URL, use the format MyDomainName.my.salesforce.com (not MyDomainName.lightning.force.com). To
|
|
216
|
-
specify a sandbox, set --instanceurl to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
217
|
-
|
|
218
|
-
ALIASES
|
|
219
|
-
$ sfdx force:auth:jwt:grant
|
|
220
|
-
|
|
221
|
-
EXAMPLES
|
|
222
|
-
$ sfdx auth:jwt:grant -u me@my.org -f <path to jwt key file> -i <OAuth client id>
|
|
156
|
+
If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.
|
|
223
157
|
|
|
224
|
-
|
|
158
|
+
To specify a My Domain URL, use the format https://yourcompanyname.my.salesforce.com.
|
|
225
159
|
|
|
226
|
-
|
|
160
|
+
To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
227
161
|
```
|
|
228
162
|
|
|
229
|
-
_See code: [src/commands/
|
|
163
|
+
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/2.8.19/src/commands/org/login/access-token.ts)_
|
|
230
164
|
|
|
231
|
-
## `sfdx
|
|
165
|
+
## `sfdx org:login:device`
|
|
232
166
|
|
|
233
|
-
|
|
167
|
+
Authorize an org using a device code.
|
|
234
168
|
|
|
235
169
|
```
|
|
236
170
|
USAGE
|
|
237
|
-
$ sfdx
|
|
171
|
+
$ sfdx org:login:device [--json] [-i <value>] [-r <value>] [-d] [-s] [-a <value>]
|
|
238
172
|
|
|
239
173
|
FLAGS
|
|
240
|
-
--
|
|
241
|
-
--
|
|
242
|
-
|
|
174
|
+
-a, --alias=<value> Alias for the org.
|
|
175
|
+
-d, --set-default-dev-hub Set the authenticated org as the default Dev Hub.
|
|
176
|
+
-i, --client-id=<value> OAuth client ID (also called consumer key) of your custom connected app.
|
|
177
|
+
-r, --instance-url=<value> URL of the instance that the org lives on.
|
|
178
|
+
-s, --set-default Set the authenticated org as the default that all org-related commands run against.
|
|
179
|
+
|
|
180
|
+
GLOBAL FLAGS
|
|
181
|
+
--json Format output as json.
|
|
243
182
|
|
|
244
183
|
DESCRIPTION
|
|
245
|
-
|
|
184
|
+
Authorize an org using a device code.
|
|
246
185
|
|
|
247
|
-
|
|
248
|
-
$ sfdx force:auth:list
|
|
249
|
-
```
|
|
186
|
+
Use this command to allow a device to connect to an org.
|
|
250
187
|
|
|
251
|
-
|
|
188
|
+
When you run this command, it first displays an 8-digit device code and the URL for verifying the code on your org.
|
|
189
|
+
The default instance URL is https://login.salesforce.com, so if the org you're authorizing is on a different instance,
|
|
190
|
+
use the --instance-url. The command waits while you complete the verification. Open a browser and navigate to the
|
|
191
|
+
displayed verification URL, enter the code, then click Connect. If you aren't already logged into your org, log in,
|
|
192
|
+
and then you're prompted to allow the device to connect to the org. After you successfully authorize the org, you can
|
|
193
|
+
close the browser window.
|
|
252
194
|
|
|
253
|
-
|
|
195
|
+
ALIASES
|
|
196
|
+
$ sfdx force:auth:device:login
|
|
197
|
+
$ sfdx auth:device:login
|
|
254
198
|
|
|
255
|
-
|
|
199
|
+
EXAMPLES
|
|
200
|
+
Authorize an org using a device code, give the org the alias TestOrg1, and set it as your default Dev Hub org:
|
|
256
201
|
|
|
257
|
-
|
|
258
|
-
USAGE
|
|
259
|
-
$ sfdx auth:logout [-a] [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
|
260
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
202
|
+
$ sfdx org:login:device --set-default-dev-hub --alias TestOrg1
|
|
261
203
|
|
|
262
|
-
|
|
263
|
-
-a, --all include all authenticated orgs
|
|
264
|
-
-p, --noprompt do not prompt for confirmation
|
|
265
|
-
-u, --targetusername=<value> username or alias for the target
|
|
266
|
-
org; overrides default target org
|
|
267
|
-
--apiversion=<value> override the api version used for
|
|
268
|
-
api requests made by this command
|
|
269
|
-
--json format output as json
|
|
270
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
271
|
-
this command invocation
|
|
204
|
+
Authorize an org in which you've created a custom connected app with the specified client ID (consumer key):
|
|
272
205
|
|
|
273
|
-
|
|
274
|
-
log out from authorized orgs
|
|
206
|
+
$ sfdx org:login:device --client-id <OAuth client id>
|
|
275
207
|
|
|
276
|
-
|
|
208
|
+
Authorize a sandbox org with the specified instance URL:
|
|
277
209
|
|
|
278
|
-
|
|
279
|
-
$ sfdx force:auth:logout
|
|
210
|
+
$ sfdx org:login:device --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com
|
|
280
211
|
|
|
281
|
-
|
|
282
|
-
|
|
212
|
+
FLAG DESCRIPTIONS
|
|
213
|
+
-r, --instance-url=<value> URL of the instance that the org lives on.
|
|
214
|
+
|
|
215
|
+
If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.
|
|
283
216
|
|
|
284
|
-
|
|
217
|
+
To specify a My Domain URL, use the format https://yourcompanyname.my.salesforce.com.
|
|
285
218
|
|
|
286
|
-
|
|
219
|
+
To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
287
220
|
```
|
|
288
221
|
|
|
289
|
-
_See code: [src/commands/
|
|
222
|
+
_See code: [src/commands/org/login/device.ts](https://github.com/salesforcecli/plugin-auth/blob/2.8.19/src/commands/org/login/device.ts)_
|
|
290
223
|
|
|
291
|
-
## `sfdx
|
|
224
|
+
## `sfdx org:login:jwt`
|
|
292
225
|
|
|
293
|
-
|
|
226
|
+
Log in to a Salesforce org using a JSON web token (JWT).
|
|
294
227
|
|
|
295
228
|
```
|
|
296
229
|
USAGE
|
|
297
|
-
$ sfdx
|
|
298
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
230
|
+
$ sfdx org:login:jwt -o <value> -f <value> -i <value> [--json] [-r <value>] [-d] [-s] [-a <value>]
|
|
299
231
|
|
|
300
232
|
FLAGS
|
|
301
|
-
-a, --
|
|
302
|
-
|
|
303
|
-
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
--json format output as json
|
|
312
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
313
|
-
this command invocation
|
|
233
|
+
-a, --alias=<value> Alias for the org.
|
|
234
|
+
-d, --set-default-dev-hub Set the authenticated org as the default Dev Hub.
|
|
235
|
+
-f, --jwt-key-file=<value> (required) Path to a file containing the private key.
|
|
236
|
+
-i, --client-id=<value> (required) OAuth client ID (also called consumer key) of your custom connected app.
|
|
237
|
+
-o, --username=<value> (required) Username of the user logging in.
|
|
238
|
+
-r, --instance-url=<value> URL of the instance that the org lives on.
|
|
239
|
+
-s, --set-default Set the authenticated org as the default that all org-related commands run against.
|
|
240
|
+
|
|
241
|
+
GLOBAL FLAGS
|
|
242
|
+
--json Format output as json.
|
|
314
243
|
|
|
315
244
|
DESCRIPTION
|
|
316
|
-
|
|
245
|
+
Log in to a Salesforce org using a JSON web token (JWT).
|
|
317
246
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
doesn't include the protocol ("https://").
|
|
247
|
+
Use this command in automated environments where you can’t interactively log in with a browser, such as in CI/CD
|
|
248
|
+
scripts.
|
|
321
249
|
|
|
322
|
-
|
|
323
|
-
|
|
250
|
+
Logging into an org authorizes the CLI to run other commands that connect to that org, such as deploying or retrieving
|
|
251
|
+
a project. You can log into many types of orgs, such as sandboxes, Dev Hubs, Env Hubs, production orgs, and scratch
|
|
252
|
+
orgs.
|
|
324
253
|
|
|
325
|
-
|
|
254
|
+
Complete these steps before you run this command:
|
|
326
255
|
|
|
327
|
-
|
|
256
|
+
1. Create a digital certificate (also called digital signature) and the private key to sign the certificate. You can
|
|
257
|
+
use your own key and certificate issued by a certification authority. Or use OpenSSL to create a key and a self-signed
|
|
258
|
+
digital certificate.
|
|
259
|
+
2. Store the private key in a file on your computer. When you run this command, you set the --jwt-key-file flag to
|
|
260
|
+
this file.
|
|
261
|
+
3. Create a custom connected app in your org using the digital certificate. Make note of the consumer key (also called
|
|
262
|
+
client id) that’s generated for you. Be sure the username of the user logging in is approved to use the connected app.
|
|
263
|
+
When you run this command, you set the --client-id flag to the consumer key.
|
|
328
264
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
and not the JWT bearer flow.
|
|
265
|
+
See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm for more
|
|
266
|
+
information.
|
|
332
267
|
|
|
333
|
-
|
|
334
|
-
|
|
268
|
+
We recommend that you set an alias when you log into an org. Aliases make it easy to later reference this org when
|
|
269
|
+
running commands that require it. If you don’t set an alias, you use the username that you specified when you logged
|
|
270
|
+
in to the org. If you run multiple commands that reference the same org, consider setting the org as your default. Use
|
|
271
|
+
--set-default for your default scratch org or sandbox, or --set-default-dev-hub for your default Dev Hub.
|
|
335
272
|
|
|
336
273
|
ALIASES
|
|
337
|
-
$ sfdx force:auth:
|
|
274
|
+
$ sfdx force:auth:jwt:grant
|
|
275
|
+
$ sfdx auth:jwt:grant
|
|
338
276
|
|
|
339
277
|
EXAMPLES
|
|
340
|
-
|
|
278
|
+
Log into an org with username jdoe@example.org and on the default instance URL (https://login.salesforce.org). The
|
|
279
|
+
private key is stored in the file /Users/jdoe/JWT/server.key and the command uses the connected app with consumer
|
|
280
|
+
key (client id) 04580y4051234051.
|
|
341
281
|
|
|
342
|
-
|
|
343
|
-
|
|
282
|
+
$ sfdx org:login:jwt --username jdoe@example.org --jwt-key-file /Users/jdoe/JWT/server.key --client-id \
|
|
283
|
+
04580y4051234051
|
|
344
284
|
|
|
345
|
-
|
|
285
|
+
Set the org as the default and give it an alias:
|
|
346
286
|
|
|
347
|
-
|
|
287
|
+
$ sfdx org:login:jwt --username jdoe@example.org --jwt-key-file /Users/jdoe/JWT/server.key --client-id \
|
|
288
|
+
04580y4051234051 --alias ci-org --set-default
|
|
348
289
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
```
|
|
352
|
-
USAGE
|
|
353
|
-
$ sfdx auth:web:login [-i <string>] [-r <url>] [-d] [-s] [-a <string>] [--json] [--loglevel
|
|
354
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
290
|
+
Set the org as the default Dev Hub and give it an alias:
|
|
355
291
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
org
|
|
359
|
-
-d, --setdefaultdevhubusername set the authenticated org as the
|
|
360
|
-
default dev hub org for scratch org
|
|
361
|
-
creation
|
|
362
|
-
-i, --clientid=<value> OAuth client ID (sometimes called
|
|
363
|
-
the consumer key)
|
|
364
|
-
-r, --instanceurl=<value> the login URL of the instance the
|
|
365
|
-
org lives on
|
|
366
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
367
|
-
default username that all commands
|
|
368
|
-
run against
|
|
369
|
-
--json format output as json
|
|
370
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
371
|
-
this command invocation
|
|
292
|
+
$ sfdx org:login:jwt --username jdoe@example.org --jwt-key-file /Users/jdoe/JWT/server.key --client-id \
|
|
293
|
+
04580y4051234051 --alias ci-dev-hub --set-default-dev-hub
|
|
372
294
|
|
|
373
|
-
|
|
374
|
-
authorize an org using the web login flow
|
|
295
|
+
Log in to a sandbox using URL https://MyDomainName--SandboxName.sandbox.my.salesforce.com:
|
|
375
296
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
297
|
+
$ sfdx org:login:jwt --username jdoe@example.org --jwt-key-file /Users/jdoe/JWT/server.key --client-id \
|
|
298
|
+
04580y4051234051 --alias ci-org --set-default --instance-url \
|
|
299
|
+
https://MyDomainName--SandboxName.sandbox.my.salesforce.com
|
|
379
300
|
|
|
380
|
-
|
|
381
|
-
|
|
301
|
+
FLAG DESCRIPTIONS
|
|
302
|
+
-r, --instance-url=<value> URL of the instance that the org lives on.
|
|
382
303
|
|
|
383
|
-
|
|
384
|
-
$ sfdx auth:web:login -a TestOrg1
|
|
304
|
+
If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.
|
|
385
305
|
|
|
386
|
-
|
|
306
|
+
To specify a My Domain URL, use the format https://yourcompanyname.my.salesforce.com.
|
|
387
307
|
|
|
388
|
-
|
|
308
|
+
To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
389
309
|
```
|
|
390
310
|
|
|
391
|
-
_See code: [src/commands/
|
|
311
|
+
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/2.8.19/src/commands/org/login/jwt.ts)_
|
|
392
312
|
|
|
393
|
-
## `sfdx
|
|
313
|
+
## `sfdx org:login:sfdx-url`
|
|
394
314
|
|
|
395
|
-
|
|
315
|
+
Authorize an org using a Salesforce DX authorization URL stored in a file.
|
|
396
316
|
|
|
397
317
|
```
|
|
398
318
|
USAGE
|
|
399
|
-
$ sfdx
|
|
400
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
319
|
+
$ sfdx org:login:sfdx-url -f <value> [--json] [-d] [-s] [-a <value>]
|
|
401
320
|
|
|
402
321
|
FLAGS
|
|
403
|
-
-a, --
|
|
404
|
-
|
|
405
|
-
-
|
|
406
|
-
|
|
407
|
-
creation
|
|
408
|
-
-p, --noprompt do not prompt for confirmation
|
|
409
|
-
-r, --instanceurl=<value> (required) the login URL of the
|
|
410
|
-
instance the org lives on
|
|
411
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
412
|
-
default username that all commands
|
|
413
|
-
run against
|
|
414
|
-
--json format output as json
|
|
415
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
416
|
-
this command invocation
|
|
417
|
-
|
|
418
|
-
DESCRIPTION
|
|
419
|
-
authorize an org using an existing Salesforce access token
|
|
322
|
+
-a, --alias=<value> Alias for the org.
|
|
323
|
+
-d, --set-default-dev-hub Set the authenticated org as the default Dev Hub.
|
|
324
|
+
-f, --sfdx-url-file=<value> (required) Path to a file that contains the Salesforce DX authorization URL.
|
|
325
|
+
-s, --set-default Set the authenticated org as the default that all org-related commands run against.
|
|
420
326
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
To use the command in a CI/CD script, set the SFDX_ACCESS_TOKEN environment variable to the access token. Then run the
|
|
425
|
-
command with the --noprompt parameter. "<org id>!<accesstoken>"
|
|
426
|
-
|
|
427
|
-
ALIASES
|
|
428
|
-
$ sfdx force:auth:accesstoken:store
|
|
429
|
-
|
|
430
|
-
EXAMPLES
|
|
431
|
-
$ sfdx auth:accesstoken:store --instanceurl https://mycompany.my.salesforce.com
|
|
327
|
+
GLOBAL FLAGS
|
|
328
|
+
--json Format output as json.
|
|
432
329
|
|
|
433
|
-
|
|
330
|
+
DESCRIPTION
|
|
331
|
+
Authorize an org using a Salesforce DX authorization URL stored in a file.
|
|
434
332
|
|
|
435
|
-
|
|
436
|
-
|
|
333
|
+
The Salesforce DX (SFDX) authorization URL must have the format
|
|
334
|
+
"force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". NOTE: The SFDX authorization URL uses the "force"
|
|
335
|
+
protocol, and not "http" or "https". Also, the "instanceUrl" inside the SFDX authorization URL doesn't include the
|
|
336
|
+
protocol ("https://").
|
|
437
337
|
|
|
438
|
-
|
|
338
|
+
You have three options when creating the authorization file. The easiest option is to redirect the output of the "sfdx
|
|
339
|
+
org display --verbose --json" command into a file. For example, using an org with alias my-org that you've already
|
|
340
|
+
authorized:
|
|
439
341
|
|
|
440
|
-
|
|
342
|
+
$ sfdx org display --target-org my-org --verbose --json > authFile.json
|
|
441
343
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
$ sfdx force:auth:device:login [-i <string>] [-r <url>] [-d] [-s] [-a <string>] [--json] [--loglevel
|
|
445
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
344
|
+
The resulting JSON file contains the URL in the "sfdxAuthUrl" property of the "result" object. You can then reference
|
|
345
|
+
the file when running this command:
|
|
446
346
|
|
|
447
|
-
|
|
448
|
-
-a, --setalias=<value> set an alias for the authenticated
|
|
449
|
-
org
|
|
450
|
-
-d, --setdefaultdevhubusername set the authenticated org as the
|
|
451
|
-
default dev hub org for scratch org
|
|
452
|
-
creation
|
|
453
|
-
-i, --clientid=<value> OAuth client ID (sometimes called
|
|
454
|
-
the consumer key)
|
|
455
|
-
-r, --instanceurl=<value> the login URL of the instance the
|
|
456
|
-
org lives on
|
|
457
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
458
|
-
default username that all commands
|
|
459
|
-
run against
|
|
460
|
-
--json format output as json
|
|
461
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
462
|
-
this command invocation
|
|
347
|
+
$ sfdx org:login:sfdx-url --sfdx-url-file authFile.json
|
|
463
348
|
|
|
464
|
-
|
|
465
|
-
|
|
349
|
+
NOTE: The "sfdx org display --verbose" command displays the refresh token only for orgs authorized with the web server
|
|
350
|
+
flow, and not the JWT bearer flow.
|
|
466
351
|
|
|
467
|
-
You
|
|
468
|
-
you
|
|
352
|
+
You can also create a JSON file that has a top-level property named sfdxAuthUrl whose value is the authorization URL.
|
|
353
|
+
Finally, you can create a normal text file that includes just the URL and nothing else.
|
|
469
354
|
|
|
470
355
|
ALIASES
|
|
471
|
-
$ sfdx force:auth:
|
|
356
|
+
$ sfdx force:auth:sfdxurl:store
|
|
357
|
+
$ sfdx auth:sfdxurl:store
|
|
472
358
|
|
|
473
359
|
EXAMPLES
|
|
474
|
-
|
|
360
|
+
Authorize an org using the SFDX authorization URL in the files/authFile.json file:
|
|
361
|
+
|
|
362
|
+
$ sfdx org:login:sfdx-url --sfdx-url-file files/authFile.json
|
|
475
363
|
|
|
476
|
-
|
|
364
|
+
Similar to previous example, but set the org as your default and give it an alias MyDefaultOrg:
|
|
477
365
|
|
|
478
|
-
|
|
366
|
+
$ sfdx org:login:sfdx-url --sfdx-url-file files/authFile.json --set-default --alias MyDefaultOrg
|
|
479
367
|
```
|
|
480
368
|
|
|
481
|
-
|
|
369
|
+
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/2.8.19/src/commands/org/login/sfdx-url.ts)_
|
|
482
370
|
|
|
483
|
-
|
|
371
|
+
## `sfdx org:login:web`
|
|
372
|
+
|
|
373
|
+
Log in to a Salesforce org using the web server flow.
|
|
484
374
|
|
|
485
375
|
```
|
|
486
376
|
USAGE
|
|
487
|
-
$ sfdx
|
|
488
|
-
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
377
|
+
$ sfdx org:login:web [--json] [-b chrome|edge|firefox] [-i <value>] [-r <value>] [-d] [-s] [-a <value>]
|
|
489
378
|
|
|
490
379
|
FLAGS
|
|
491
|
-
-a, --
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
org lives on
|
|
502
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
503
|
-
default username that all commands
|
|
504
|
-
run against
|
|
505
|
-
-u, --username=<value> (required) authentication username
|
|
506
|
-
--json format output as json
|
|
507
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
508
|
-
this command invocation
|
|
380
|
+
-a, --alias=<value> Alias for the org.
|
|
381
|
+
-b, --browser=<option> Browser in which to open the org.
|
|
382
|
+
<options: chrome|edge|firefox>
|
|
383
|
+
-d, --set-default-dev-hub Set the authenticated org as the default Dev Hub.
|
|
384
|
+
-i, --client-id=<value> OAuth client ID (also called consumer key) of your custom connected app.
|
|
385
|
+
-r, --instance-url=<value> URL of the instance that the org lives on.
|
|
386
|
+
-s, --set-default Set the authenticated org as the default that all org-related commands run against.
|
|
387
|
+
|
|
388
|
+
GLOBAL FLAGS
|
|
389
|
+
--json Format output as json.
|
|
509
390
|
|
|
510
391
|
DESCRIPTION
|
|
511
|
-
|
|
392
|
+
Log in to a Salesforce org using the web server flow.
|
|
512
393
|
|
|
513
|
-
|
|
394
|
+
Opens a Salesforce instance URL in a web browser so you can enter your credentials and log in to your org. After you
|
|
395
|
+
log in, you can close the browser window.
|
|
514
396
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
397
|
+
Logging into an org authorizes the CLI to run other commands that connect to that org, such as deploying or retrieving
|
|
398
|
+
metadata. You can log into many types of orgs, such as sandboxes, Dev Hubs, Env Hubs, production orgs, and scratch
|
|
399
|
+
orgs.
|
|
400
|
+
|
|
401
|
+
We recommend that you set an alias when you log into an org. Aliases make it easy to later reference this org when
|
|
402
|
+
running commands that require it. If you don’t set an alias, you use the username that you specified when you logged
|
|
403
|
+
in to the org. If you run multiple commands that reference the same org, consider setting the org as your default. Use
|
|
404
|
+
--set-default for your default scratch org or sandbox, or --set-default-dev-hub for your default Dev Hub.
|
|
405
|
+
|
|
406
|
+
By default, this command uses the global out-of-the-box connected app in your org. If you need more security or
|
|
407
|
+
control, such as setting the refresh token timeout or specifying IP ranges, create your own connected app using a
|
|
408
|
+
digital certificate. Make note of the consumer key (also called cliend id) that’s generated for you. Then specify the
|
|
409
|
+
consumer key with the --client-id flag.
|
|
518
410
|
|
|
519
411
|
ALIASES
|
|
520
|
-
$ sfdx force:auth:
|
|
412
|
+
$ sfdx force:auth:web:login
|
|
413
|
+
$ sfdx auth:web:login
|
|
521
414
|
|
|
522
415
|
EXAMPLES
|
|
523
|
-
|
|
416
|
+
Run the command with no flags to open the default Salesforce login page (https://login.salesforce.com):
|
|
524
417
|
|
|
525
|
-
|
|
418
|
+
$ sfdx org:login:web
|
|
526
419
|
|
|
527
|
-
|
|
528
|
-
|
|
420
|
+
Log in to your Dev Hub, set it as your default Dev Hub, and set an alias that you reference later when you create a
|
|
421
|
+
scratch org:
|
|
529
422
|
|
|
530
|
-
|
|
423
|
+
$ sfdx org:login:web --set-default-dev-hub --alias dev-hub
|
|
531
424
|
|
|
532
|
-
|
|
425
|
+
Log in to a sandbox and set it as your default org:
|
|
533
426
|
|
|
534
|
-
|
|
535
|
-
USAGE
|
|
536
|
-
$ sfdx force:auth:list [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
427
|
+
$ sfdx org:login:web --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default
|
|
537
428
|
|
|
538
|
-
|
|
539
|
-
--json format output as json
|
|
540
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
541
|
-
this command invocation
|
|
429
|
+
Use --browser to specify a specific browser, such as Google Chrome:
|
|
542
430
|
|
|
543
|
-
|
|
544
|
-
|
|
431
|
+
$ sfdx org:login:web --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default \
|
|
432
|
+
--browser chrome
|
|
545
433
|
|
|
546
|
-
|
|
547
|
-
$ sfdx force:auth:list
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
## `sfdx force:auth:logout [-a] [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
434
|
+
Use your own connected app by specifying its consumer key (also called client ID):
|
|
551
435
|
|
|
552
|
-
|
|
436
|
+
$ sfdx org:login:web --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default \
|
|
437
|
+
--browser chrome --client-id 04580y4051234051
|
|
553
438
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
$ sfdx force:auth:logout [-a] [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
|
557
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
439
|
+
FLAG DESCRIPTIONS
|
|
440
|
+
-b, --browser=chrome|edge|firefox Browser in which to open the org.
|
|
558
441
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
-p, --noprompt do not prompt for confirmation
|
|
562
|
-
-u, --targetusername=<value> username or alias for the target
|
|
563
|
-
org; overrides default target org
|
|
564
|
-
--apiversion=<value> override the api version used for
|
|
565
|
-
api requests made by this command
|
|
566
|
-
--json format output as json
|
|
567
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
568
|
-
this command invocation
|
|
442
|
+
If you don’t specify --browser, the command uses your default browser. The exact names of the browser applications
|
|
443
|
+
differ depending on the operating system you're on; check your documentation for details.
|
|
569
444
|
|
|
570
|
-
|
|
571
|
-
log out from authorized orgs
|
|
445
|
+
-r, --instance-url=<value> URL of the instance that the org lives on.
|
|
572
446
|
|
|
573
|
-
|
|
447
|
+
If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.
|
|
574
448
|
|
|
575
|
-
|
|
576
|
-
$ sfdx force:auth:logout
|
|
449
|
+
To specify a My Domain URL, use the format https://yourcompanyname.my.salesforce.com.
|
|
577
450
|
|
|
578
|
-
|
|
579
|
-
$ sfdx auth:logout -u me@my.org
|
|
580
|
-
|
|
581
|
-
$ sfdx auth:logout -a
|
|
582
|
-
|
|
583
|
-
$ sfdx auth:logout -p
|
|
451
|
+
To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
584
452
|
```
|
|
585
453
|
|
|
586
|
-
|
|
454
|
+
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/2.8.19/src/commands/org/login/web.ts)_
|
|
455
|
+
|
|
456
|
+
## `sfdx org:logout`
|
|
587
457
|
|
|
588
|
-
|
|
458
|
+
Log out of a Salesforce org.
|
|
589
459
|
|
|
590
460
|
```
|
|
591
461
|
USAGE
|
|
592
|
-
$ sfdx
|
|
593
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
462
|
+
$ sfdx org:logout [--json] [-a | -o <value>] [-p]
|
|
594
463
|
|
|
595
464
|
FLAGS
|
|
596
|
-
-a, --
|
|
597
|
-
|
|
598
|
-
-
|
|
599
|
-
default dev hub org for scratch org
|
|
600
|
-
creation
|
|
601
|
-
-f, --sfdxurlfile=<value> (required) path to a file containing
|
|
602
|
-
the sfdx url
|
|
603
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
604
|
-
default username that all commands
|
|
605
|
-
run against
|
|
606
|
-
--json format output as json
|
|
607
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
608
|
-
this command invocation
|
|
609
|
-
|
|
610
|
-
DESCRIPTION
|
|
611
|
-
authorize an org using an SFDX auth URL stored within a file
|
|
612
|
-
|
|
613
|
-
The SFDX auth URL must have the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". NOTE: The
|
|
614
|
-
SFDX auth URL uses the "force" protocol, and not "http" or "https". Also, the "instanceUrl" inside the SFDX auth URL
|
|
615
|
-
doesn't include the protocol ("https://").
|
|
465
|
+
-a, --all Include all authenticated orgs.
|
|
466
|
+
-o, --target-org=<value> Username or alias of the target org.
|
|
467
|
+
-p, --no-prompt Don't prompt for confirmation.
|
|
616
468
|
|
|
617
|
-
|
|
618
|
-
|
|
469
|
+
GLOBAL FLAGS
|
|
470
|
+
--json Format output as json.
|
|
619
471
|
|
|
620
|
-
|
|
472
|
+
DESCRIPTION
|
|
473
|
+
Log out of a Salesforce org.
|
|
621
474
|
|
|
622
|
-
|
|
475
|
+
If you run this command with no flags and no default org set in your config or environment, it first displays a list
|
|
476
|
+
of orgs you've created or logged into, with none of the orgs selected. Use the arrow keys to scroll through the list
|
|
477
|
+
and the space bar to select the orgs you want to log out of. Press Enter when you're done; the command asks for a
|
|
478
|
+
final confirmation before logging out of the selected orgs.
|
|
623
479
|
|
|
624
|
-
The
|
|
625
|
-
|
|
626
|
-
|
|
480
|
+
The process is similar if you specify --all, except that in the initial list of orgs, they're all selected. Use
|
|
481
|
+
--target-org to logout of a specific org. In both these cases by default, you must still confirm that you want to log
|
|
482
|
+
out. Use --no-prompt to never be asked for confirmation when also using --all or --target-org.
|
|
627
483
|
|
|
628
|
-
|
|
629
|
-
|
|
484
|
+
Be careful! If you log out of a scratch org without having access to its password, you can't access the scratch org
|
|
485
|
+
again, either through the CLI or the Salesforce UI.
|
|
630
486
|
|
|
631
487
|
ALIASES
|
|
632
|
-
$ sfdx force:auth:
|
|
488
|
+
$ sfdx force:auth:logout
|
|
489
|
+
$ sfdx auth:logout
|
|
633
490
|
|
|
634
491
|
EXAMPLES
|
|
635
|
-
|
|
492
|
+
Interactively select the orgs to log out of:
|
|
636
493
|
|
|
637
|
-
|
|
638
|
-
```
|
|
494
|
+
$ sfdx org:logout
|
|
639
495
|
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
authorize an org using the web login flow
|
|
643
|
-
|
|
644
|
-
```
|
|
645
|
-
USAGE
|
|
646
|
-
$ sfdx force:auth:web:login [-i <string>] [-r <url>] [-d] [-s] [-a <string>] [--json] [--loglevel
|
|
647
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
496
|
+
Log out of the org with username me@my.org:
|
|
648
497
|
|
|
649
|
-
|
|
650
|
-
-a, --setalias=<value> set an alias for the authenticated
|
|
651
|
-
org
|
|
652
|
-
-d, --setdefaultdevhubusername set the authenticated org as the
|
|
653
|
-
default dev hub org for scratch org
|
|
654
|
-
creation
|
|
655
|
-
-i, --clientid=<value> OAuth client ID (sometimes called
|
|
656
|
-
the consumer key)
|
|
657
|
-
-r, --instanceurl=<value> the login URL of the instance the
|
|
658
|
-
org lives on
|
|
659
|
-
-s, --setdefaultusername set the authenticated org as the
|
|
660
|
-
default username that all commands
|
|
661
|
-
run against
|
|
662
|
-
--json format output as json
|
|
663
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
664
|
-
this command invocation
|
|
498
|
+
$ sfdx org:logout --target-org me@my.org
|
|
665
499
|
|
|
666
|
-
|
|
667
|
-
authorize an org using the web login flow
|
|
500
|
+
Log out of all orgs after confirmation:
|
|
668
501
|
|
|
669
|
-
|
|
670
|
-
specify a My Domain URL, use the format MyDomainName.my.salesforce.com (not MyDomainName.lightning.force.com). To log
|
|
671
|
-
in to a sandbox, set --instanceurl to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
502
|
+
$ sfdx org:logout --all
|
|
672
503
|
|
|
673
|
-
|
|
674
|
-
$ sfdx force:auth:web:login
|
|
504
|
+
Logout of the org with alias my-scratch and don't prompt for confirmation:
|
|
675
505
|
|
|
676
|
-
|
|
677
|
-
$ sfdx auth:web:login -a TestOrg1
|
|
506
|
+
$ sfdx org:logout --target-org my-scratch --no-prompt
|
|
678
507
|
|
|
679
|
-
|
|
508
|
+
FLAG DESCRIPTIONS
|
|
509
|
+
-a, --all Include all authenticated orgs.
|
|
680
510
|
|
|
681
|
-
|
|
511
|
+
All orgs includes Dev Hubs, sandboxes, DE orgs, and expired, deleted, and unknown-status scratch orgs.
|
|
682
512
|
```
|
|
683
513
|
|
|
514
|
+
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/2.8.19/src/commands/org/logout.ts)_
|
|
515
|
+
|
|
684
516
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-auth",
|
|
3
3
|
"description": "plugin for sfdx auth commands",
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.19",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@oclif/core": "^2.15.0",
|
|
10
10
|
"@salesforce/core": "^5.2.0",
|
|
11
11
|
"@salesforce/kit": "^3.0.9",
|
|
12
|
-
"@salesforce/sf-plugins-core": "^3.1.
|
|
12
|
+
"@salesforce/sf-plugins-core": "^3.1.25",
|
|
13
13
|
"@salesforce/ts-types": "^2.0.6",
|
|
14
14
|
"chalk": "^4.1.2",
|
|
15
15
|
"inquirer": "^8.2.6",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@oclif/plugin-command-snapshot": "^4.0.14",
|
|
21
|
-
"@salesforce/cli-plugins-testkit": "^4.
|
|
21
|
+
"@salesforce/cli-plugins-testkit": "^4.3.6",
|
|
22
22
|
"@salesforce/dev-config": "^4.0.1",
|
|
23
23
|
"@salesforce/dev-scripts": "^5.10.0",
|
|
24
|
-
"@salesforce/plugin-command-reference": "^3.0.
|
|
24
|
+
"@salesforce/plugin-command-reference": "^3.0.32",
|
|
25
25
|
"@salesforce/plugin-settings": "^1.4.28",
|
|
26
26
|
"@salesforce/prettier-config": "^0.0.3",
|
|
27
27
|
"@salesforce/ts-sinon": "^1.4.15",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
31
31
|
"@typescript-eslint/parser": "^5.62.0",
|
|
32
32
|
"chai": "^4.3.8",
|
|
33
|
-
"eslint": "^8.
|
|
33
|
+
"eslint": "^8.50.0",
|
|
34
34
|
"eslint-config-prettier": "^8.10.0",
|
|
35
35
|
"eslint-config-salesforce": "^2.0.2",
|
|
36
36
|
"eslint-config-salesforce-license": "^0.2.0",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"eslint-plugin-header": "^3.1.1",
|
|
39
39
|
"eslint-plugin-import": "2.28.1",
|
|
40
40
|
"eslint-plugin-jsdoc": "^43.2.0",
|
|
41
|
-
"eslint-plugin-sf-plugin": "^1.16.
|
|
41
|
+
"eslint-plugin-sf-plugin": "^1.16.5",
|
|
42
42
|
"husky": "^7.0.4",
|
|
43
43
|
"mocha": "^9.1.3",
|
|
44
44
|
"nyc": "^15.1.0",
|
|
45
|
-
"oclif": "^3.
|
|
45
|
+
"oclif": "^3.17.1",
|
|
46
46
|
"prettier": "^2.8.8",
|
|
47
47
|
"pretty-quick": "^3.1.0",
|
|
48
48
|
"shx": "0.3.4",
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
"sfdx": {
|
|
243
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/2.8.
|
|
244
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/2.8.
|
|
243
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/2.8.19.crt",
|
|
244
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/2.8.19.sig"
|
|
245
245
|
}
|
|
246
246
|
}
|