@salesforce/plugin-auth 3.6.129 → 3.7.1
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 +34 -11
- package/lib/commands/org/login/web.d.ts +3 -0
- package/lib/commands/org/login/web.js +47 -8
- package/lib/commands/org/login/web.js.map +1 -1
- package/lib/commands/org/logout.d.ts +2 -0
- package/lib/commands/org/logout.js +36 -0
- package/lib/commands/org/logout.js.map +1 -1
- package/messages/logout.md +19 -1
- package/messages/web.login.md +20 -2
- package/oclif.manifest.json +43 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -108,7 +108,7 @@ EXAMPLES
|
|
|
108
108
|
$ sf org list auth
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
111
|
+
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.7.1/src/commands/org/list/auth.ts)_
|
|
112
112
|
|
|
113
113
|
## `sf org login access-token`
|
|
114
114
|
|
|
@@ -162,7 +162,7 @@ FLAG DESCRIPTIONS
|
|
|
162
162
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
165
|
+
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.7.1/src/commands/org/login/access-token.ts)_
|
|
166
166
|
|
|
167
167
|
## `sf org login device`
|
|
168
168
|
|
|
@@ -222,7 +222,7 @@ FLAG DESCRIPTIONS
|
|
|
222
222
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
_See code: [src/commands/org/login/device.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
225
|
+
_See code: [src/commands/org/login/device.ts](https://github.com/salesforcecli/plugin-auth/blob/3.7.1/src/commands/org/login/device.ts)_
|
|
226
226
|
|
|
227
227
|
## `sf org login jwt`
|
|
228
228
|
|
|
@@ -313,7 +313,7 @@ FLAG DESCRIPTIONS
|
|
|
313
313
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
314
314
|
```
|
|
315
315
|
|
|
316
|
-
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
316
|
+
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.7.1/src/commands/org/login/jwt.ts)_
|
|
317
317
|
|
|
318
318
|
## `sf org login sfdx-url`
|
|
319
319
|
|
|
@@ -383,7 +383,7 @@ EXAMPLES
|
|
|
383
383
|
$ echo url | sf org login sfdx-url --sfdx-url-stdin
|
|
384
384
|
```
|
|
385
385
|
|
|
386
|
-
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
386
|
+
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.7.1/src/commands/org/login/sfdx-url.ts)_
|
|
387
387
|
|
|
388
388
|
## `sf org login web`
|
|
389
389
|
|
|
@@ -392,16 +392,24 @@ Log in to a Salesforce org using the web server flow.
|
|
|
392
392
|
```
|
|
393
393
|
USAGE
|
|
394
394
|
$ sf org login web [--json] [--flags-dir <value>] [-b chrome|edge|firefox] [-i <value>] [-r <value>] [-d] [-s]
|
|
395
|
-
[-a <value>]
|
|
395
|
+
[-a <value>] [-c <value> --username <value>] [--scopes <value>]
|
|
396
396
|
|
|
397
397
|
FLAGS
|
|
398
398
|
-a, --alias=<value> Alias for the org.
|
|
399
399
|
-b, --browser=<option> Browser in which to open the org.
|
|
400
400
|
<options: chrome|edge|firefox>
|
|
401
|
+
-c, --client-app=<value> Name to give to the link between the connected app or external client and the
|
|
402
|
+
already-authenticated user. You can specify any string you want. Must be used with
|
|
403
|
+
--username.
|
|
401
404
|
-d, --set-default-dev-hub Set the authenticated org as the default Dev Hub.
|
|
402
405
|
-i, --client-id=<value> OAuth client ID (also called consumer key) of your custom connected app.
|
|
403
406
|
-r, --instance-url=<value> URL of the instance that the org lives on.
|
|
404
407
|
-s, --set-default Set the authenticated org as the default that all org-related commands run against.
|
|
408
|
+
--scopes=<value> Authentication (OAuth) scopes to request. Use the scope's short name; specify multiple
|
|
409
|
+
scopes using just one flag instance and separated by spaces: --scopes "sfap_api
|
|
410
|
+
chatbot_api".
|
|
411
|
+
--username=<value> Username of the already-authenticated user to link to the connected app or external client
|
|
412
|
+
app. Must be used with --client-app.
|
|
405
413
|
|
|
406
414
|
GLOBAL FLAGS
|
|
407
415
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -427,6 +435,15 @@ DESCRIPTION
|
|
|
427
435
|
digital certificate. Make note of the consumer key (also called cliend id) that’s generated for you. Then specify the
|
|
428
436
|
consumer key with the --client-id flag.
|
|
429
437
|
|
|
438
|
+
You can also use this command to link one or more connected or external client apps in an org to an
|
|
439
|
+
already-authenticated user. Then Salesforce CLI commands that have API-specific requirements, such as new OAuth scopes
|
|
440
|
+
or JWT-based access tokens, can use these custom client apps rather than the default one. To create the link, you use
|
|
441
|
+
the --client-app flag to give the link a name and the --username flag to specify the already-authenticated user. Use
|
|
442
|
+
the --scopes flag to add OAuth scopes if required. After you create the link, you then use the --client-app value in
|
|
443
|
+
the other command that has the API-specific requirements. An example of a command that uses this feature is "agent
|
|
444
|
+
preview"; see the "Preview an Agent" section in the "Agentforce Developer Guide" for details and examples.
|
|
445
|
+
(https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html)
|
|
446
|
+
|
|
430
447
|
ALIASES
|
|
431
448
|
$ sf force auth web login
|
|
432
449
|
$ sf auth web login
|
|
@@ -450,10 +467,11 @@ EXAMPLES
|
|
|
450
467
|
$ sf org login web --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default \
|
|
451
468
|
--browser chrome
|
|
452
469
|
|
|
453
|
-
Use your own connected app by specifying its consumer key (also called client ID)
|
|
470
|
+
Use your own connected app by specifying its consumer key (also called client ID) and specify additional OAuth
|
|
471
|
+
scopes:
|
|
454
472
|
|
|
455
473
|
$ sf org login web --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default \
|
|
456
|
-
--browser chrome --client-id 04580y4051234051
|
|
474
|
+
--browser chrome --client-id 04580y4051234051 --scopes "sfap_api chatbot_api"
|
|
457
475
|
|
|
458
476
|
FLAG DESCRIPTIONS
|
|
459
477
|
-b, --browser=chrome|edge|firefox Browser in which to open the org.
|
|
@@ -470,7 +488,7 @@ FLAG DESCRIPTIONS
|
|
|
470
488
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
471
489
|
```
|
|
472
490
|
|
|
473
|
-
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
491
|
+
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/3.7.1/src/commands/org/login/web.ts)_
|
|
474
492
|
|
|
475
493
|
## `sf org logout`
|
|
476
494
|
|
|
@@ -478,10 +496,11 @@ Log out of a Salesforce org.
|
|
|
478
496
|
|
|
479
497
|
```
|
|
480
498
|
USAGE
|
|
481
|
-
$ sf org logout [--json] [--flags-dir <value>] [-
|
|
499
|
+
$ sf org logout [--json] [--flags-dir <value>] [-c <value> -o <value>] [-a | ] [-p]
|
|
482
500
|
|
|
483
501
|
FLAGS
|
|
484
502
|
-a, --all Include all authenticated orgs.
|
|
503
|
+
-c, --client-app=<value> Client app to log out of.
|
|
485
504
|
-o, --target-org=<value> Username or alias of the target org.
|
|
486
505
|
-p, --no-prompt Don't prompt for confirmation.
|
|
487
506
|
|
|
@@ -504,6 +523,10 @@ DESCRIPTION
|
|
|
504
523
|
Be careful! If you log out of a scratch org without having access to its password, you can't access the scratch org
|
|
505
524
|
again, either through the CLI or the Salesforce UI.
|
|
506
525
|
|
|
526
|
+
Use the --client-app flag to log out of the link you previously created between an authenticated user and a connected
|
|
527
|
+
app or external client app; you create these links with "org login web --client-app". Run "org display" to get the
|
|
528
|
+
list of client app names.
|
|
529
|
+
|
|
507
530
|
ALIASES
|
|
508
531
|
$ sf force auth logout
|
|
509
532
|
$ sf auth logout
|
|
@@ -531,6 +554,6 @@ FLAG DESCRIPTIONS
|
|
|
531
554
|
All orgs includes Dev Hubs, sandboxes, DE orgs, and expired, deleted, and unknown-status scratch orgs.
|
|
532
555
|
```
|
|
533
556
|
|
|
534
|
-
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
557
|
+
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/3.7.1/src/commands/org/logout.ts)_
|
|
535
558
|
|
|
536
559
|
<!-- commandsstop -->
|
|
@@ -15,6 +15,9 @@ export default class LoginWeb extends SfCommand<AuthFields> {
|
|
|
15
15
|
alias: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
loglevel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'client-app': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
username: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
scopes: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
21
|
};
|
|
19
22
|
private logger;
|
|
20
23
|
run(): Promise<AuthFields>;
|
|
@@ -65,6 +65,18 @@ export default class LoginWeb extends SfCommand {
|
|
|
65
65
|
aliases: ['noprompt'],
|
|
66
66
|
}),
|
|
67
67
|
loglevel,
|
|
68
|
+
'client-app': Flags.string({
|
|
69
|
+
char: 'c',
|
|
70
|
+
summary: messages.getMessage('flags.client-app.summary'),
|
|
71
|
+
dependsOn: ['username'],
|
|
72
|
+
}),
|
|
73
|
+
username: Flags.string({
|
|
74
|
+
summary: messages.getMessage('flags.username.summary'),
|
|
75
|
+
dependsOn: ['client-app'],
|
|
76
|
+
}),
|
|
77
|
+
scopes: Flags.string({
|
|
78
|
+
summary: messages.getMessage('flags.scopes.summary'),
|
|
79
|
+
}),
|
|
68
80
|
};
|
|
69
81
|
logger = Logger.childFromRoot(this.constructor.name);
|
|
70
82
|
async run() {
|
|
@@ -74,6 +86,23 @@ export default class LoginWeb extends SfCommand {
|
|
|
74
86
|
}
|
|
75
87
|
if (await common.shouldExitCommand(flags['no-prompt']))
|
|
76
88
|
return {};
|
|
89
|
+
// Add ca/eca to already existing auth info.
|
|
90
|
+
if (flags['client-app'] && flags.username) {
|
|
91
|
+
// 1. get username authinfo
|
|
92
|
+
const userAuthInfo = await AuthInfo.create({
|
|
93
|
+
username: flags.username,
|
|
94
|
+
});
|
|
95
|
+
const authFields = userAuthInfo.getFields(true);
|
|
96
|
+
// 2. web-auth and save name, clientId, accessToken, and refreshToken in `apps` object
|
|
97
|
+
const oauthConfig = {
|
|
98
|
+
loginUrl: authFields.loginUrl,
|
|
99
|
+
clientId: flags['client-id'],
|
|
100
|
+
...{ clientSecret: await this.secretPrompt({ message: commonMessages.getMessage('clientSecretStdin') }) },
|
|
101
|
+
};
|
|
102
|
+
await this.executeLoginFlow(oauthConfig, flags.browser, flags['client-app'], flags.username, flags.scopes);
|
|
103
|
+
this.logSuccess(messages.getMessage('linkedClientApp', [flags['client-app'], flags.username]));
|
|
104
|
+
return userAuthInfo.getFields(true);
|
|
105
|
+
}
|
|
77
106
|
const oauthConfig = {
|
|
78
107
|
loginUrl: await common.resolveLoginUrl(flags['instance-url']?.href),
|
|
79
108
|
clientId: flags['client-id'],
|
|
@@ -104,24 +133,34 @@ export default class LoginWeb extends SfCommand {
|
|
|
104
133
|
}
|
|
105
134
|
// leave it because it's stubbed in the test
|
|
106
135
|
// eslint-disable-next-line class-methods-use-this
|
|
107
|
-
async executeLoginFlow(oauthConfig, browser) {
|
|
108
|
-
|
|
136
|
+
async executeLoginFlow(oauthConfig, browser, app, username, scopes) {
|
|
137
|
+
// The server handles 2 possible auth scenarios:
|
|
138
|
+
// a. 1st time auth, creates auth file.
|
|
139
|
+
// b. Add CA/ECA to existing auth.
|
|
140
|
+
const oauthServer = await WebOAuthServer.create({
|
|
141
|
+
oauthConfig: {
|
|
142
|
+
...oauthConfig,
|
|
143
|
+
scope: scopes,
|
|
144
|
+
},
|
|
145
|
+
clientApp: app,
|
|
146
|
+
username,
|
|
147
|
+
});
|
|
109
148
|
await oauthServer.start();
|
|
110
|
-
const
|
|
111
|
-
const openOptions =
|
|
112
|
-
this.logger.debug(`Opening browser ${
|
|
149
|
+
const browserApp = browser && browser in apps ? browser : undefined;
|
|
150
|
+
const openOptions = browserApp ? { app: { name: apps[browserApp] }, wait: false } : { wait: false };
|
|
151
|
+
this.logger.debug(`Opening browser ${browserApp ?? ''}`);
|
|
113
152
|
// the following `childProcess` wrapper is needed to catch when `open` fails to open a browser.
|
|
114
153
|
await open(oauthServer.getAuthorizationUrl(), openOptions).then((childProcess) => new Promise((resolve, reject) => {
|
|
115
154
|
// https://nodejs.org/api/child_process.html#event-exit
|
|
116
155
|
childProcess.on('exit', (code) => {
|
|
117
156
|
if (code && code > 0) {
|
|
118
|
-
this.logger.debug(`Failed to open browser ${
|
|
119
|
-
reject(messages.createError('error.cannotOpenBrowser', [
|
|
157
|
+
this.logger.debug(`Failed to open browser ${browserApp ?? ''}`);
|
|
158
|
+
reject(messages.createError('error.cannotOpenBrowser', [browserApp], [browserApp]));
|
|
120
159
|
}
|
|
121
160
|
// If the process exited, code is the final exit code of the process, otherwise null.
|
|
122
161
|
// resolve on null just to be safe, worst case the browser didn't open and the CLI just hangs.
|
|
123
162
|
if (code === null || code === 0) {
|
|
124
|
-
this.logger.debug(`Successfully opened browser ${
|
|
163
|
+
this.logger.debug(`Successfully opened browser ${browserApp ?? ''}`);
|
|
125
164
|
resolve(childProcess);
|
|
126
165
|
}
|
|
127
166
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../../src/commands/org/login/web.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,EAAE,EAAE,IAAI,EAAW,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAc,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAgB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjH,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAC;AAC/E,MAAM,cAAc,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,UAAU,CAAC,CAAC;AAEpF,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAqB;IAClD,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,gBAAgB,GAAG,IAAI,CAAC;IACxC,MAAM,CAAU,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AAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC/B,IAAI,IAAI,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;oBACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,UAAU,IAAI,EAAE,EAAE,CAAC,CAAC;oBAChE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,yBAAyB,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBACtF,CAAC;gBACD,qFAAqF;gBACrF,8FAA8F;gBAC9F,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;oBAChC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,UAAU,IAAI,EAAE,EAAE,CAAC,CAAC;oBACrE,OAAO,CAAC,YAAY,CAAC,CAAC;gBACxB,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CACL,CAAC;QACF,OAAO,WAAW,CAAC,gBAAgB,EAAE,CAAC;IACxC,CAAC;;AAGH,MAAM,eAAe,GAAG,GAAY,EAAE;IACpC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IACtB,OAAO,GAAG,CAAC,UAAU,CAAC,mBAAmB,EAAE,GAAG,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC;AACpF,CAAC,CAAC"}
|
|
@@ -8,11 +8,13 @@ export default class Logout extends SfCommand<AuthLogoutResults> {
|
|
|
8
8
|
static readonly aliases: string[];
|
|
9
9
|
static readonly flags: {
|
|
10
10
|
'target-org': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'client-app': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
loglevel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<AuthLogoutResults>;
|
|
17
|
+
private logoutClientApp;
|
|
16
18
|
/** Warning about logging out of a scratch org and losing access to it */
|
|
17
19
|
private maybeWarnScratchOrgs;
|
|
18
20
|
}
|
|
@@ -24,6 +24,11 @@ export default class Logout extends SfCommand {
|
|
|
24
24
|
aliases: ['targetusername', 'u'],
|
|
25
25
|
deprecateAliases: true,
|
|
26
26
|
}),
|
|
27
|
+
'client-app': Flags.string({
|
|
28
|
+
char: 'c',
|
|
29
|
+
summary: messages.getMessage('flags.client-app.summary'),
|
|
30
|
+
dependsOn: ['target-org'],
|
|
31
|
+
}),
|
|
27
32
|
all: Flags.boolean({
|
|
28
33
|
char: 'a',
|
|
29
34
|
summary: messages.getMessage('flags.all.summary'),
|
|
@@ -41,6 +46,7 @@ export default class Logout extends SfCommand {
|
|
|
41
46
|
}),
|
|
42
47
|
loglevel,
|
|
43
48
|
};
|
|
49
|
+
// eslint-disable-next-line complexity
|
|
44
50
|
async run() {
|
|
45
51
|
const { flags } = await this.parse(Logout);
|
|
46
52
|
const targetUsername = flags['target-org'] ??
|
|
@@ -49,6 +55,9 @@ export default class Logout extends SfCommand {
|
|
|
49
55
|
if (flags['no-prompt'] && !targetUsername && !flags.all) {
|
|
50
56
|
throw messages.createError('noOrgSpecifiedWithNoPrompt');
|
|
51
57
|
}
|
|
58
|
+
if (flags['client-app']) {
|
|
59
|
+
return this.logoutClientApp(flags['client-app'], targetUsername);
|
|
60
|
+
}
|
|
52
61
|
if (this.jsonEnabled() && !targetUsername && !flags.all) {
|
|
53
62
|
throw messages.createError('noOrgSpecifiedWithJson');
|
|
54
63
|
}
|
|
@@ -84,6 +93,33 @@ export default class Logout extends SfCommand {
|
|
|
84
93
|
return [];
|
|
85
94
|
}
|
|
86
95
|
}
|
|
96
|
+
async logoutClientApp(clientApp, username) {
|
|
97
|
+
const authInfo = await AuthInfo.create({
|
|
98
|
+
username,
|
|
99
|
+
});
|
|
100
|
+
const authFields = authInfo.getFields(true);
|
|
101
|
+
if (!authFields.clientApps) {
|
|
102
|
+
throw messages.createError('error.noLinkedApps', [username]);
|
|
103
|
+
}
|
|
104
|
+
if (authFields.clientApps && !(clientApp in authFields.clientApps)) {
|
|
105
|
+
throw messages.createError('error.invalidClientApp', [username, clientApp]);
|
|
106
|
+
}
|
|
107
|
+
// if logging out of the last client app, remove the whole `clientApps` object from the auth fields
|
|
108
|
+
if (Object.keys(authFields.clientApps).length === 1) {
|
|
109
|
+
await authInfo.save({
|
|
110
|
+
clientApps: undefined,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
// just remove the specific client app entry
|
|
115
|
+
delete authFields.clientApps[clientApp];
|
|
116
|
+
await authInfo.save({
|
|
117
|
+
clientApps: authFields.clientApps,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
this.logSuccess(messages.getMessage('logoutClientAppSuccess', [clientApp, username]));
|
|
121
|
+
return [clientApp];
|
|
122
|
+
}
|
|
87
123
|
/** Warning about logging out of a scratch org and losing access to it */
|
|
88
124
|
maybeWarnScratchOrgs(orgs) {
|
|
89
125
|
if (orgs.some((org) => org.isScratchOrg)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../src/commands/org/logout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EACL,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,IAAI,EAEJ,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,cA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AC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpE,MAAM,UAAU,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,iBAAiB,EAAE,GAAG,CAAC,EAAE,CAAC;IAClE,MAAM,WAAW,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,EAAE,CAAC;IAC/D,MAAM,YAAY,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,CAAC,EAAE,CAAC;IACjE,MAAM,UAAU,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,EAAE,CAAC;IAC1D,OAAO,CAAC,IAAI,SAAS,CAAC,KAAK,UAAU,MAAM,UAAU,MAAM,WAAW,MAAM,YAAY,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC;AAC3G,CAAC,CAAC"}
|
package/messages/logout.md
CHANGED
|
@@ -10,6 +10,8 @@ The process is similar if you specify --all, except that in the initial list of
|
|
|
10
10
|
|
|
11
11
|
Be careful! If you log out of a scratch org without having access to its password, you can't access the scratch org again, either through the CLI or the Salesforce UI.
|
|
12
12
|
|
|
13
|
+
Use the --client-app flag to log out of the link you previously created between an authenticated user and a connected app or external client app; you create these links with "org login web --client-app". Run "org display" to get the list of client app names.
|
|
14
|
+
|
|
13
15
|
# examples
|
|
14
16
|
|
|
15
17
|
- Interactively select the orgs to log out of:
|
|
@@ -40,10 +42,26 @@ Include all authenticated orgs.
|
|
|
40
42
|
|
|
41
43
|
All orgs includes Dev Hubs, sandboxes, DE orgs, and expired, deleted, and unknown-status scratch orgs.
|
|
42
44
|
|
|
45
|
+
# flags.client-app.summary
|
|
46
|
+
|
|
47
|
+
Client app to log out of.
|
|
48
|
+
|
|
43
49
|
# logoutOrgCommandSuccess
|
|
44
50
|
|
|
45
51
|
Successfully logged out of orgs: %s
|
|
46
52
|
|
|
53
|
+
# logoutClientAppSuccess
|
|
54
|
+
|
|
55
|
+
Successfully logged out of "%s" client app for user %s.
|
|
56
|
+
|
|
57
|
+
# error.noLinkedApps
|
|
58
|
+
|
|
59
|
+
%s doesn't have any linked client apps.
|
|
60
|
+
|
|
61
|
+
# error.invalidClientApp
|
|
62
|
+
|
|
63
|
+
%s doesn't have a linked client app named "%s".
|
|
64
|
+
|
|
47
65
|
# noOrgsFound
|
|
48
66
|
|
|
49
67
|
No orgs found to log out of.
|
|
@@ -82,6 +100,6 @@ You must specify a target-org (or default target-org config is set) or use --all
|
|
|
82
100
|
|
|
83
101
|
# warning.NoAuthFoundForTargetOrg
|
|
84
102
|
|
|
85
|
-
No authenticated org found with the %s username or alias.
|
|
103
|
+
No authenticated org found with the %s username or alias.
|
|
86
104
|
|
|
87
105
|
NOTE: Starting September 2025, this warning will be converted to an error. As a result, the exit code when you try to log out of an unauthenticated org will change from 0 to 1.
|
package/messages/web.login.md
CHANGED
|
@@ -12,6 +12,8 @@ We recommend that you set an alias when you log into an org. Aliases make it eas
|
|
|
12
12
|
|
|
13
13
|
By default, this command uses the global out-of-the-box connected app in your org. If you need more security or control, such as setting the refresh token timeout or specifying IP ranges, create your own connected app using a digital certificate. Make note of the consumer key (also called cliend id) that’s generated for you. Then specify the consumer key with the --client-id flag.
|
|
14
14
|
|
|
15
|
+
You can also use this command to link one or more connected or external client apps in an org to an already-authenticated user. Then Salesforce CLI commands that have API-specific requirements, such as new OAuth scopes or JWT-based access tokens, can use these custom client apps rather than the default one. To create the link, you use the --client-app flag to give the link a name and the --username flag to specify the already-authenticated user. Use the --scopes flag to add OAuth scopes if required. After you create the link, you then use the --client-app value in the other command that has the API-specific requirements. An example of a command that uses this feature is "agent preview"; see the "Preview an Agent" section in the "Agentforce Developer Guide" for details and examples. (https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html)
|
|
16
|
+
|
|
15
17
|
# examples
|
|
16
18
|
|
|
17
19
|
- Run the command with no flags to open the default Salesforce login page (https://login.salesforce.com):
|
|
@@ -30,9 +32,9 @@ By default, this command uses the global out-of-the-box connected app in your or
|
|
|
30
32
|
|
|
31
33
|
<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default --browser chrome
|
|
32
34
|
|
|
33
|
-
- Use your own connected app by specifying its consumer key (also called client ID):
|
|
35
|
+
- Use your own connected app by specifying its consumer key (also called client ID) and specify additional OAuth scopes:
|
|
34
36
|
|
|
35
|
-
<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default --browser chrome --client-id 04580y4051234051
|
|
37
|
+
<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default --browser chrome --client-id 04580y4051234051 --scopes "sfap_api chatbot_api"
|
|
36
38
|
|
|
37
39
|
# flags.browser.summary
|
|
38
40
|
|
|
@@ -42,6 +44,22 @@ Browser in which to open the org.
|
|
|
42
44
|
|
|
43
45
|
If you don’t specify --browser, the command uses your default browser. The exact names of the browser applications differ depending on the operating system you're on; check your documentation for details.
|
|
44
46
|
|
|
47
|
+
# flags.client-app.summary
|
|
48
|
+
|
|
49
|
+
Name to give to the link between the connected app or external client and the already-authenticated user. You can specify any string you want. Must be used with --username.
|
|
50
|
+
|
|
51
|
+
# flags.username.summary
|
|
52
|
+
|
|
53
|
+
Username of the already-authenticated user to link to the connected app or external client app. Must be used with --client-app.
|
|
54
|
+
|
|
55
|
+
# flags.scopes.summary
|
|
56
|
+
|
|
57
|
+
Authentication (OAuth) scopes to request. Use the scope's short name; specify multiple scopes using just one flag instance and separated by spaces: --scopes "sfap_api chatbot_api".
|
|
58
|
+
|
|
59
|
+
# linkedClientApp
|
|
60
|
+
|
|
61
|
+
Successfully linked "%s" client app to %s.
|
|
62
|
+
|
|
45
63
|
# deviceWarning
|
|
46
64
|
|
|
47
65
|
"<%= config.bin %> <%= command.id %>" doesn't work when authorizing to a headless environment. Use "<%= config.bin %> org login device" instead.
|
package/oclif.manifest.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
],
|
|
8
8
|
"args": {},
|
|
9
9
|
"deprecateAliases": true,
|
|
10
|
-
"description": "If you run this command with no flags and no default org set in your config or environment, it first displays a list of orgs you've created or logged into, with none of the orgs selected. Use the arrow keys to scroll through the list 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 final confirmation before logging out of the selected orgs.\n\nThe process is similar if you specify --all, except that in the initial list of orgs, they're all selected. Use --target-org to logout of a specific org. In both these cases by default, you must still confirm that you want to log out. Use --no-prompt to never be asked for confirmation when also using --all or --target-org.\n\nBe careful! If you log out of a scratch org without having access to its password, you can't access the scratch org again, either through the CLI or the Salesforce UI.",
|
|
10
|
+
"description": "If you run this command with no flags and no default org set in your config or environment, it first displays a list of orgs you've created or logged into, with none of the orgs selected. Use the arrow keys to scroll through the list 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 final confirmation before logging out of the selected orgs.\n\nThe process is similar if you specify --all, except that in the initial list of orgs, they're all selected. Use --target-org to logout of a specific org. In both these cases by default, you must still confirm that you want to log out. Use --no-prompt to never be asked for confirmation when also using --all or --target-org.\n\nBe careful! If you log out of a scratch org without having access to its password, you can't access the scratch org again, either through the CLI or the Salesforce UI.\n\nUse the --client-app flag to log out of the link you previously created between an authenticated user and a connected app or external client app; you create these links with \"org login web --client-app\". Run \"org display\" to get the list of client app names.",
|
|
11
11
|
"examples": [
|
|
12
12
|
"Interactively select the orgs to log out of:\n<%= config.bin %> <%= command.id %>",
|
|
13
13
|
"Log out of the org with username me@my.org:\n<%= config.bin %> <%= command.id %> --target-org me@my.org",
|
|
@@ -43,6 +43,17 @@
|
|
|
43
43
|
"multiple": false,
|
|
44
44
|
"type": "option"
|
|
45
45
|
},
|
|
46
|
+
"client-app": {
|
|
47
|
+
"char": "c",
|
|
48
|
+
"dependsOn": [
|
|
49
|
+
"target-org"
|
|
50
|
+
],
|
|
51
|
+
"name": "client-app",
|
|
52
|
+
"summary": "Client app to log out of.",
|
|
53
|
+
"hasDynamicHelp": false,
|
|
54
|
+
"multiple": false,
|
|
55
|
+
"type": "option"
|
|
56
|
+
},
|
|
46
57
|
"all": {
|
|
47
58
|
"char": "a",
|
|
48
59
|
"description": "All orgs includes Dev Hubs, sandboxes, DE orgs, and expired, deleted, and unknown-status scratch orgs.",
|
|
@@ -880,13 +891,13 @@
|
|
|
880
891
|
],
|
|
881
892
|
"args": {},
|
|
882
893
|
"deprecateAliases": true,
|
|
883
|
-
"description": "Opens a Salesforce instance URL in a web browser so you can enter your credentials and log in to your org. After you log in, you can close the browser window.\n\nLogging into an org authorizes the CLI to run other commands that connect to that org, such as deploying or retrieving metadata. You can log into many types of orgs, such as sandboxes, Dev Hubs, Env Hubs, production orgs, and scratch orgs.\n\nWe 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.\n\nBy default, this command uses the global out-of-the-box connected app in your org. If you need more security or control, such as setting the refresh token timeout or specifying IP ranges, create your own connected app using a digital certificate. Make note of the consumer key (also called cliend id) that’s generated for you. Then specify the consumer key with the --client-id flag.",
|
|
894
|
+
"description": "Opens a Salesforce instance URL in a web browser so you can enter your credentials and log in to your org. After you log in, you can close the browser window.\n\nLogging into an org authorizes the CLI to run other commands that connect to that org, such as deploying or retrieving metadata. You can log into many types of orgs, such as sandboxes, Dev Hubs, Env Hubs, production orgs, and scratch orgs.\n\nWe 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.\n\nBy default, this command uses the global out-of-the-box connected app in your org. If you need more security or control, such as setting the refresh token timeout or specifying IP ranges, create your own connected app using a digital certificate. Make note of the consumer key (also called cliend id) that’s generated for you. Then specify the consumer key with the --client-id flag.\n\nYou can also use this command to link one or more connected or external client apps in an org to an already-authenticated user. Then Salesforce CLI commands that have API-specific requirements, such as new OAuth scopes or JWT-based access tokens, can use these custom client apps rather than the default one. To create the link, you use the --client-app flag to give the link a name and the --username flag to specify the already-authenticated user. Use the --scopes flag to add OAuth scopes if required. After you create the link, you then use the --client-app value in the other command that has the API-specific requirements. An example of a command that uses this feature is \"agent preview\"; see the \"Preview an Agent\" section in the \"Agentforce Developer Guide\" for details and examples. (https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html)",
|
|
884
895
|
"examples": [
|
|
885
896
|
"Run the command with no flags to open the default Salesforce login page (https://login.salesforce.com):\n<%= config.bin %> <%= command.id %>",
|
|
886
897
|
"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 scratch org:\n<%= config.bin %> <%= command.id %> --set-default-dev-hub --alias dev-hub",
|
|
887
898
|
"Log in to a sandbox and set it as your default org:\n<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default",
|
|
888
899
|
"Use --browser to specify a specific browser, such as Google Chrome:\n<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default --browser chrome",
|
|
889
|
-
"Use your own connected app by specifying its consumer key (also called client ID):\n<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default --browser chrome --client-id 04580y4051234051"
|
|
900
|
+
"Use your own connected app by specifying its consumer key (also called client ID) and specify additional OAuth scopes:\n<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com --set-default --browser chrome --client-id 04580y4051234051 --scopes \"sfap_api chatbot_api\""
|
|
890
901
|
],
|
|
891
902
|
"flags": {
|
|
892
903
|
"json": {
|
|
@@ -1002,6 +1013,34 @@
|
|
|
1002
1013
|
"hasDynamicHelp": false,
|
|
1003
1014
|
"multiple": false,
|
|
1004
1015
|
"type": "option"
|
|
1016
|
+
},
|
|
1017
|
+
"client-app": {
|
|
1018
|
+
"char": "c",
|
|
1019
|
+
"dependsOn": [
|
|
1020
|
+
"username"
|
|
1021
|
+
],
|
|
1022
|
+
"name": "client-app",
|
|
1023
|
+
"summary": "Name to give to the link between the connected app or external client and the already-authenticated user. You can specify any string you want. Must be used with --username.",
|
|
1024
|
+
"hasDynamicHelp": false,
|
|
1025
|
+
"multiple": false,
|
|
1026
|
+
"type": "option"
|
|
1027
|
+
},
|
|
1028
|
+
"username": {
|
|
1029
|
+
"dependsOn": [
|
|
1030
|
+
"client-app"
|
|
1031
|
+
],
|
|
1032
|
+
"name": "username",
|
|
1033
|
+
"summary": "Username of the already-authenticated user to link to the connected app or external client app. Must be used with --client-app.",
|
|
1034
|
+
"hasDynamicHelp": false,
|
|
1035
|
+
"multiple": false,
|
|
1036
|
+
"type": "option"
|
|
1037
|
+
},
|
|
1038
|
+
"scopes": {
|
|
1039
|
+
"name": "scopes",
|
|
1040
|
+
"summary": "Authentication (OAuth) scopes to request. Use the scope's short name; specify multiple scopes using just one flag instance and separated by spaces: --scopes \"sfap_api chatbot_api\".",
|
|
1041
|
+
"hasDynamicHelp": false,
|
|
1042
|
+
"multiple": false,
|
|
1043
|
+
"type": "option"
|
|
1005
1044
|
}
|
|
1006
1045
|
},
|
|
1007
1046
|
"hasDynamicHelp": false,
|
|
@@ -1063,5 +1102,5 @@
|
|
|
1063
1102
|
]
|
|
1064
1103
|
}
|
|
1065
1104
|
},
|
|
1066
|
-
"version": "3.
|
|
1105
|
+
"version": "3.7.1"
|
|
1067
1106
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-auth",
|
|
3
3
|
"description": "plugin for sf auth commands",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.7.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@inquirer/checkbox": "^2.5.0",
|
|
9
9
|
"@inquirer/select": "^2.5.0",
|
|
10
10
|
"@oclif/core": "^4",
|
|
11
|
-
"@salesforce/core": "^8.
|
|
11
|
+
"@salesforce/core": "^8.13.0",
|
|
12
12
|
"@salesforce/kit": "^3.2.3",
|
|
13
13
|
"@salesforce/plugin-info": "^3.4.65",
|
|
14
14
|
"@salesforce/sf-plugins-core": "^12.2.2",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"open": "^10.1.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@oclif/plugin-command-snapshot": "^5.
|
|
19
|
+
"@oclif/plugin-command-snapshot": "^5.3.0",
|
|
20
20
|
"@salesforce/cli-plugins-testkit": "^5.3.39",
|
|
21
21
|
"@salesforce/dev-scripts": "^11.0.2",
|
|
22
22
|
"@salesforce/plugin-command-reference": "^3.1.54",
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
"exports": "./lib/index.js",
|
|
235
235
|
"type": "module",
|
|
236
236
|
"sfdx": {
|
|
237
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/3.
|
|
238
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/3.
|
|
237
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/3.7.1.crt",
|
|
238
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/3.7.1.sig"
|
|
239
239
|
}
|
|
240
240
|
}
|