@salesforce/plugin-org 5.10.13 → 5.11.0

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 CHANGED
@@ -99,6 +99,9 @@ the [SandboxNuts](https://github.com/salesforcecli/plugin-org/actions/workflows/
99
99
 
100
100
  <!-- commands -->
101
101
 
102
+ - [`sf org auth show-access-token`](#sf-org-auth-show-access-token)
103
+ - [`sf org auth show-sfdx-auth-url`](#sf-org-auth-show-sfdx-auth-url)
104
+ - [`sf org auth show-user-password`](#sf-org-auth-show-user-password)
102
105
  - [`sf org create agent-user`](#sf-org-create-agent-user)
103
106
  - [`sf org create sandbox`](#sf-org-create-sandbox)
104
107
  - [`sf org create scratch`](#sf-org-create-scratch)
@@ -117,6 +120,140 @@ the [SandboxNuts](https://github.com/salesforcecli/plugin-org/actions/workflows/
117
120
  - [`sf org resume sandbox`](#sf-org-resume-sandbox)
118
121
  - [`sf org resume scratch`](#sf-org-resume-scratch)
119
122
 
123
+ ## `sf org auth show-access-token`
124
+
125
+ Show the current access token for an org.
126
+
127
+ ```
128
+ USAGE
129
+ $ sf org auth show-access-token -o <value> [--json] [--flags-dir <value>] [-p]
130
+
131
+ FLAGS
132
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
133
+ configuration variable is already set.
134
+ -p, --no-prompt Skip the security warning and reveal the access token without confirmation.
135
+
136
+ GLOBAL FLAGS
137
+ --flags-dir=<value> Import flag values from a directory.
138
+ --json Format output as json.
139
+
140
+ DESCRIPTION
141
+ Show the current access token for an org.
142
+
143
+ Because access tokens are sensitive credentials that grant full access to an org, this command prompts for
144
+ confirmation before revealing the token. Skip confirmation by specifying either the --no-prompt or --json flag.
145
+
146
+ EXAMPLES
147
+ Show the access token for the default org:
148
+
149
+ $ sf org auth show-access-token
150
+
151
+ Show the access token for an org with alias "my-org":
152
+
153
+ $ sf org auth show-access-token --target-org my-org
154
+
155
+ Show the access token without the confirmation prompt:
156
+
157
+ $ sf org auth show-access-token --target-org my-org --no-prompt
158
+
159
+ Get the access token as JSON for use in scripts:
160
+
161
+ $ sf org auth show-access-token --target-org my-org --json
162
+ ```
163
+
164
+ _See code: [src/commands/org/auth/show-access-token.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/auth/show-access-token.ts)_
165
+
166
+ ## `sf org auth show-sfdx-auth-url`
167
+
168
+ Show the SFDX Auth URL for an org.
169
+
170
+ ```
171
+ USAGE
172
+ $ sf org auth show-sfdx-auth-url -o <value> [--json] [--flags-dir <value>] [-p]
173
+
174
+ FLAGS
175
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
176
+ configuration variable is already set.
177
+ -p, --no-prompt Skip the security warning and reveal the SFDX Auth URL without confirmation.
178
+
179
+ GLOBAL FLAGS
180
+ --flags-dir=<value> Import flag values from a directory.
181
+ --json Format output as json.
182
+
183
+ DESCRIPTION
184
+ Show the SFDX Auth URL for an org.
185
+
186
+ Shows the SFDX Auth URL for an org. This URL is only available for orgs authenticated via a web-based OAuth flow. This
187
+ command prompts for confirmation before revealing it. Skip confirmation by specifying either the --no-prompt or --json
188
+ flag.
189
+
190
+ EXAMPLES
191
+ Show the SFDX Auth URL for the default org:
192
+
193
+ $ sf org auth show-sfdx-auth-url
194
+
195
+ Show the SFDX Auth URL for an org with alias "my-org":
196
+
197
+ $ sf org auth show-sfdx-auth-url --target-org my-org
198
+
199
+ Show the SFDX Auth URL without the confirmation prompt:
200
+
201
+ $ sf org auth show-sfdx-auth-url --target-org my-org --no-prompt
202
+
203
+ Get the SFDX Auth URL as JSON for use in scripts:
204
+
205
+ $ sf org auth show-sfdx-auth-url --target-org my-org --json
206
+ ```
207
+
208
+ _See code: [src/commands/org/auth/show-sfdx-auth-url.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/auth/show-sfdx-auth-url.ts)_
209
+
210
+ ## `sf org auth show-user-password`
211
+
212
+ Show the stored password for an org's user.
213
+
214
+ ```
215
+ USAGE
216
+ $ sf org auth show-user-password -o <value> [--json] [--flags-dir <value>] [-p]
217
+
218
+ FLAGS
219
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
220
+ configuration variable is already set.
221
+ -p, --no-prompt Skip the security warning and reveal the password without confirmation.
222
+
223
+ GLOBAL FLAGS
224
+ --flags-dir=<value> Import flag values from a directory.
225
+ --json Format output as json.
226
+
227
+ DESCRIPTION
228
+ Show the stored password for an org's user.
229
+
230
+ This command shows only passwords that were generated locally in your DX project with either the "org generate
231
+ password" or "org create user" CLI command. If you generated a password for a user in Setup in your org, you can't
232
+ show it with this command.
233
+
234
+ Because passwords are sensitive credentials, this command prompts for confirmation before revealing it. Skip
235
+ confirmation by specifying either the --no-prompt or --json flag.
236
+
237
+ EXAMPLES
238
+ Show the password for the default org's user:
239
+
240
+ $ sf org auth show-user-password
241
+
242
+ Show the password for an org with alias "my-org":
243
+
244
+ $ sf org auth show-user-password --target-org my-org
245
+
246
+ Show the password without the confirmation prompt:
247
+
248
+ $ sf org auth show-user-password --target-org my-org --no-prompt
249
+
250
+ Get the password as JSON for use in scripts:
251
+
252
+ $ sf org auth show-user-password --target-org my-org --json
253
+ ```
254
+
255
+ _See code: [src/commands/org/auth/show-user-password.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/auth/show-user-password.ts)_
256
+
120
257
  ## `sf org create agent-user`
121
258
 
122
259
  Create the default Salesforce user that is used to run an agent.
@@ -193,7 +330,7 @@ FLAG DESCRIPTIONS
193
330
  "agent.user.<GUID>@your-org-domain.com".
194
331
  ```
195
332
 
196
- _See code: [src/commands/org/create/agent-user.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/create/agent-user.ts)_
333
+ _See code: [src/commands/org/create/agent-user.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/create/agent-user.ts)_
197
334
 
198
335
  ## `sf org create sandbox`
199
336
 
@@ -327,7 +464,7 @@ FLAG DESCRIPTIONS
327
464
  You can specify either --source-sandbox-name or --source-id when cloning an existing sandbox, but not both.
328
465
  ```
329
466
 
330
- _See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/create/sandbox.ts)_
467
+ _See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/create/sandbox.ts)_
331
468
 
332
469
  ## `sf org create scratch`
333
470
 
@@ -509,7 +646,7 @@ FLAG DESCRIPTIONS
509
646
  Omit this flag to have Salesforce generate a unique username for your org.
510
647
  ```
511
648
 
512
- _See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/create/scratch.ts)_
649
+ _See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/create/scratch.ts)_
513
650
 
514
651
  ## `sf org delete sandbox`
515
652
 
@@ -555,7 +692,7 @@ EXAMPLES
555
692
  $ sf org delete sandbox --target-org my-sandbox --no-prompt
556
693
  ```
557
694
 
558
- _See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/delete/sandbox.ts)_
695
+ _See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/delete/sandbox.ts)_
559
696
 
560
697
  ## `sf org delete scratch`
561
698
 
@@ -599,7 +736,7 @@ EXAMPLES
599
736
  $ sf org delete scratch --target-org my-scratch-org --no-prompt
600
737
  ```
601
738
 
602
- _See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/delete/scratch.ts)_
739
+ _See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/delete/scratch.ts)_
603
740
 
604
741
  ## `sf org disable tracking`
605
742
 
@@ -638,7 +775,7 @@ EXAMPLES
638
775
  $ sf org disable tracking
639
776
  ```
640
777
 
641
- _See code: [src/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/disable/tracking.ts)_
778
+ _See code: [src/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/disable/tracking.ts)_
642
779
 
643
780
  ## `sf org display`
644
781
 
@@ -683,7 +820,7 @@ EXAMPLES
683
820
  $ sf org display --target-org TestOrg1 --verbose
684
821
  ```
685
822
 
686
- _See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/display.ts)_
823
+ _See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/display.ts)_
687
824
 
688
825
  ## `sf org enable tracking`
689
826
 
@@ -725,7 +862,7 @@ EXAMPLES
725
862
  $ sf org enable tracking
726
863
  ```
727
864
 
728
- _See code: [src/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/enable/tracking.ts)_
865
+ _See code: [src/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/enable/tracking.ts)_
729
866
 
730
867
  ## `sf org list`
731
868
 
@@ -764,7 +901,7 @@ EXAMPLES
764
901
  $ sf org list --clean
765
902
  ```
766
903
 
767
- _See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/list.ts)_
904
+ _See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/list.ts)_
768
905
 
769
906
  ## `sf org list metadata`
770
907
 
@@ -831,7 +968,7 @@ FLAG DESCRIPTIONS
831
968
  Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
832
969
  ```
833
970
 
834
- _See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/list/metadata.ts)_
971
+ _See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/list/metadata.ts)_
835
972
 
836
973
  ## `sf org list metadata-types`
837
974
 
@@ -886,7 +1023,7 @@ FLAG DESCRIPTIONS
886
1023
  Override the api version used for api requests made by this command
887
1024
  ```
888
1025
 
889
- _See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/list/metadata-types.ts)_
1026
+ _See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/list/metadata-types.ts)_
890
1027
 
891
1028
  ## `sf org open`
892
1029
 
@@ -962,7 +1099,7 @@ EXAMPLES
962
1099
  $ sf org open --source-file force-app/main/default/bots/Coral_Cloud_Agent/Coral_Cloud_Agent.bot-meta.xml
963
1100
  ```
964
1101
 
965
- _See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/open.ts)_
1102
+ _See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/open.ts)_
966
1103
 
967
1104
  ## `sf org open agent`
968
1105
 
@@ -1037,7 +1174,7 @@ FLAG DESCRIPTIONS
1037
1174
  flag.
1038
1175
  ```
1039
1176
 
1040
- _See code: [src/commands/org/open/agent.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/open/agent.ts)_
1177
+ _See code: [src/commands/org/open/agent.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/open/agent.ts)_
1041
1178
 
1042
1179
  ## `sf org open authoring-bundle`
1043
1180
 
@@ -1083,7 +1220,7 @@ EXAMPLES
1083
1220
  $ sf org open authoring-bundle --target-org MyTestOrg1 --browser firefox
1084
1221
  ```
1085
1222
 
1086
- _See code: [src/commands/org/open/authoring-bundle.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/open/authoring-bundle.ts)_
1223
+ _See code: [src/commands/org/open/authoring-bundle.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/open/authoring-bundle.ts)_
1087
1224
 
1088
1225
  ## `sf org refresh sandbox`
1089
1226
 
@@ -1186,7 +1323,7 @@ FLAG DESCRIPTIONS
1186
1323
  You can specify either --source-sandbox-name or --source-id when refreshing an existing sandbox, but not both.
1187
1324
  ```
1188
1325
 
1189
- _See code: [src/commands/org/refresh/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/refresh/sandbox.ts)_
1326
+ _See code: [src/commands/org/refresh/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/refresh/sandbox.ts)_
1190
1327
 
1191
1328
  ## `sf org resume sandbox`
1192
1329
 
@@ -1249,7 +1386,7 @@ FLAG DESCRIPTIONS
1249
1386
  returns the job ID. To resume checking the sandbox creation, rerun this command.
1250
1387
  ```
1251
1388
 
1252
- _See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/resume/sandbox.ts)_
1389
+ _See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/resume/sandbox.ts)_
1253
1390
 
1254
1391
  ## `sf org resume scratch`
1255
1392
 
@@ -1302,6 +1439,6 @@ FLAG DESCRIPTIONS
1302
1439
  returns the job ID. To resume checking the scratch creation, rerun this command.
1303
1440
  ```
1304
1441
 
1305
- _See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/5.10.13/src/commands/org/resume/scratch.ts)_
1442
+ _See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/5.11.0/src/commands/org/resume/scratch.ts)_
1306
1443
 
1307
1444
  <!-- commandsstop -->
@@ -0,0 +1,14 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type OrgAuthShowAccessTokenResult = {
3
+ accessToken: string;
4
+ };
5
+ export default class OrgAuthShowAccessToken extends SfCommand<OrgAuthShowAccessTokenResult> {
6
+ static readonly summary: string;
7
+ static readonly description: string;
8
+ static readonly examples: string[];
9
+ static readonly flags: {
10
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<OrgAuthShowAccessTokenResult>;
14
+ }
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
17
+ import { AuthInfo, Messages, SfError } from '@salesforce/core';
18
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
19
+ const messages = Messages.loadMessages('@salesforce/plugin-org', 'org.auth.show-access-token');
20
+ export default class OrgAuthShowAccessToken extends SfCommand {
21
+ static summary = messages.getMessage('summary');
22
+ static description = messages.getMessage('description');
23
+ static examples = messages.getMessages('examples');
24
+ static flags = {
25
+ 'target-org': Flags.requiredOrg(),
26
+ 'no-prompt': Flags.boolean({
27
+ summary: messages.getMessage('flags.no-prompt.summary'),
28
+ char: 'p',
29
+ }),
30
+ };
31
+ async run() {
32
+ const { flags } = await this.parse(OrgAuthShowAccessToken);
33
+ const org = flags['target-org'];
34
+ const username = org.getUsername();
35
+ try {
36
+ // The auth file can have a stale access token. Refresh it before getting the fields
37
+ await org.refreshAuth();
38
+ }
39
+ catch (error) {
40
+ // Even if this fails, we want to display the information we can read from the auth file
41
+ this.warn('Unable to refresh auth for org. Access token may be stale.');
42
+ }
43
+ // Don't ask for confirmation if --json or --no-prompt is passed
44
+ if (!this.jsonEnabled() && !flags['no-prompt']) {
45
+ const confirmed = await this.confirm({
46
+ message: messages.getMessage('prompt.show-access-token', [username]),
47
+ ms: 30_000,
48
+ });
49
+ if (!confirmed) {
50
+ throw new SfError('Show access token confirmation denied or timed out.');
51
+ }
52
+ }
53
+ else {
54
+ // Note: We don't show this warning if the user has already been prompted
55
+ this.warn(messages.getMessage('warning.show-access-token'));
56
+ }
57
+ const authInfo = await AuthInfo.create({ username });
58
+ const { accessToken } = authInfo.getFields(true);
59
+ if (!accessToken) {
60
+ throw messages.createError('error.noAccessToken', [username]);
61
+ }
62
+ this.table({
63
+ overflow: 'wrap',
64
+ data: [{ key: 'Access Token', value: accessToken }],
65
+ });
66
+ return { accessToken };
67
+ }
68
+ }
69
+ //# sourceMappingURL=show-access-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-access-token.js","sourceRoot":"","sources":["../../../../src/commands/org/auth/show-access-token.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE/D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,4BAA4B,CAAC,CAAC;AAM/F,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAuC;IAClF,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,CA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CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrD,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAEjD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,QAAQ,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,KAAK,CAAC;YACT,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;SACpD,CAAC,CAAC;QAEH,OAAO,EAAE,WAAW,EAAE,CAAC;IACzB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type OrgAuthShowSfdxAuthUrlResult = {
3
+ sfdxAuthUrl: string;
4
+ };
5
+ export default class OrgAuthShowSfdxAuthUrl extends SfCommand<OrgAuthShowSfdxAuthUrlResult> {
6
+ static readonly summary: string;
7
+ static readonly description: string;
8
+ static readonly examples: string[];
9
+ static readonly flags: {
10
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<OrgAuthShowSfdxAuthUrlResult>;
14
+ }
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
17
+ import { AuthInfo, Messages, SfError } from '@salesforce/core';
18
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
19
+ const messages = Messages.loadMessages('@salesforce/plugin-org', 'org.auth.show-sfdx-auth-url');
20
+ export default class OrgAuthShowSfdxAuthUrl extends SfCommand {
21
+ static summary = messages.getMessage('summary');
22
+ static description = messages.getMessage('description');
23
+ static examples = messages.getMessages('examples');
24
+ static flags = {
25
+ 'target-org': Flags.requiredOrg(),
26
+ 'no-prompt': Flags.boolean({
27
+ summary: messages.getMessage('flags.no-prompt.summary'),
28
+ char: 'p',
29
+ }),
30
+ };
31
+ async run() {
32
+ const { flags } = await this.parse(OrgAuthShowSfdxAuthUrl);
33
+ const org = flags['target-org'];
34
+ const username = org.getUsername();
35
+ if (!this.jsonEnabled() && !flags['no-prompt']) {
36
+ const confirmed = await this.confirm({
37
+ message: messages.getMessage('prompt.show-sfdx-auth-url', [username]),
38
+ ms: 30_000,
39
+ });
40
+ if (!confirmed) {
41
+ throw new SfError('Show SFDX auth URL confirmation denied or timed out.');
42
+ }
43
+ }
44
+ else {
45
+ this.warn(messages.getMessage('warning.show-sfdx-auth-url'));
46
+ }
47
+ const authInfo = await AuthInfo.create({ username });
48
+ const { refreshToken } = authInfo.getFields(true);
49
+ if (!refreshToken) {
50
+ throw messages.createError('error.noRefreshToken', [username]);
51
+ }
52
+ const sfdxAuthUrl = authInfo.getSfdxAuthUrl();
53
+ this.table({
54
+ overflow: 'wrap',
55
+ data: [{ key: 'SFDX Auth URL', value: sfdxAuthUrl }],
56
+ });
57
+ return { sfdxAuthUrl };
58
+ }
59
+ }
60
+ //# sourceMappingURL=show-sfdx-auth-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-sfdx-auth-url.js","sourceRoot":"","sources":["../../../../src/commands/org/auth/show-sfdx-auth-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;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CAAC,QAAQ,CAAC,CAAC;gBACrE,EAAE,EAAE,MAAM;aACX,CAAC,CAAC;YACH,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,OAAO,CAAC,sDAAsD,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrD,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAElD,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,QAAQ,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QAE9C,IAAI,CAAC,KAAK,CAAC;YACT,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;SACrD,CAAC,CAAC;QAEH,OAAO,EAAE,WAAW,EAAE,CAAC;IACzB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type OrgAuthShowUserPasswordResult = {
3
+ password: string;
4
+ };
5
+ export default class OrgAuthShowUserPassword extends SfCommand<OrgAuthShowUserPasswordResult> {
6
+ static readonly summary: string;
7
+ static readonly description: string;
8
+ static readonly examples: string[];
9
+ static readonly flags: {
10
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<OrgAuthShowUserPasswordResult>;
14
+ }
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
17
+ import { AuthInfo, Messages, SfError } from '@salesforce/core';
18
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
19
+ const messages = Messages.loadMessages('@salesforce/plugin-org', 'org.auth.show-user-password');
20
+ export default class OrgAuthShowUserPassword extends SfCommand {
21
+ static summary = messages.getMessage('summary');
22
+ static description = messages.getMessage('description');
23
+ static examples = messages.getMessages('examples');
24
+ static flags = {
25
+ 'target-org': Flags.requiredOrg(),
26
+ 'no-prompt': Flags.boolean({
27
+ summary: messages.getMessage('flags.no-prompt.summary'),
28
+ char: 'p',
29
+ }),
30
+ };
31
+ async run() {
32
+ const { flags } = await this.parse(OrgAuthShowUserPassword);
33
+ const org = flags['target-org'];
34
+ const username = org.getUsername();
35
+ if (!this.jsonEnabled() && !flags['no-prompt']) {
36
+ const confirmed = await this.confirm({
37
+ message: messages.getMessage('prompt.show-user-password', [username]),
38
+ ms: 30_000,
39
+ });
40
+ if (!confirmed) {
41
+ throw new SfError('Show user password confirmation denied or timed out.');
42
+ }
43
+ }
44
+ else {
45
+ this.warn(messages.getMessage('warning.show-user-password'));
46
+ }
47
+ const authInfo = await AuthInfo.create({ username });
48
+ const { password } = authInfo.getFields(true);
49
+ if (!password) {
50
+ throw messages.createError('error.noPassword', [username]);
51
+ }
52
+ this.table({
53
+ overflow: 'wrap',
54
+ data: [{ key: 'Password', value: password }],
55
+ });
56
+ return { password };
57
+ }
58
+ }
59
+ //# sourceMappingURL=show-user-password.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-user-password.js","sourceRoot":"","sources":["../../../../src/commands/org/auth/show-user-password.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE/D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,6BAA6B,CAAC,CAAC;AAMhG,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,SAAwC;IACpF,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;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC;YACzB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;YACvD,IAAI,EAAE,GAAG;SACV,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAE5D,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;QAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;QAEnC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;gBACnC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,QAAQ,CAAC,CAAC;gBACrE,EAAE,EAAE,MAAM;aACX,CAAC,CAAC;YACH,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,OAAO,CAAC,sDAAsD,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrD,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,QAAQ,CAAC,WAAW,CAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7D,CAAC;QAED,IAAI,CAAC,KAAK,CAAC;YACT,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;SAC7C,CAAC,CAAC;QAEH,OAAO,EAAE,QAAQ,EAAE,CAAC;IACtB,CAAC"}
@@ -0,0 +1,41 @@
1
+ # summary
2
+
3
+ Show the current access token for an org.
4
+
5
+ # description
6
+
7
+ Because access tokens are sensitive credentials that grant full access to an org, this command prompts for confirmation before revealing the token. Skip confirmation by specifying either the --no-prompt or --json flag.
8
+
9
+ # flags.no-prompt.summary
10
+
11
+ Skip the security warning and reveal the access token without confirmation.
12
+
13
+ # prompt.show-access-token
14
+
15
+ You're about to reveal the access token for "%s". This token grants full access to the org with your current permissions. Sharing or logging this token is equivalent to sharing your credentials. Do you want to continue?
16
+
17
+ # warning.show-access-token
18
+
19
+ This command exposes a sensitive Access Token that allows for subsequent activity using your current authenticated session. Sharing this information is equivalent to logging someone in under the current credential, resulting in unintended access and escalation of privilege. For additional information about org authorization, review https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth.htm.
20
+
21
+ # error.noAccessToken
22
+
23
+ No access token found for "%s". The org may need to be re-authenticated.
24
+
25
+ # examples
26
+
27
+ - Show the access token for the default org:
28
+
29
+ <%= config.bin %> <%= command.id %>
30
+
31
+ - Show the access token for an org with alias "my-org":
32
+
33
+ <%= config.bin %> <%= command.id %> --target-org my-org
34
+
35
+ - Show the access token without the confirmation prompt:
36
+
37
+ <%= config.bin %> <%= command.id %> --target-org my-org --no-prompt
38
+
39
+ - Get the access token as JSON for use in scripts:
40
+
41
+ <%= config.bin %> <%= command.id %> --target-org my-org --json
@@ -0,0 +1,41 @@
1
+ # summary
2
+
3
+ Show the SFDX Auth URL for an org.
4
+
5
+ # description
6
+
7
+ Shows the SFDX Auth URL for an org. This URL is only available for orgs authenticated via a web-based OAuth flow. This command prompts for confirmation before revealing it. Skip confirmation by specifying either the --no-prompt or --json flag.
8
+
9
+ # flags.no-prompt.summary
10
+
11
+ Skip the security warning and reveal the SFDX Auth URL without confirmation.
12
+
13
+ # prompt.show-sfdx-auth-url
14
+
15
+ You're about to reveal the SFDX Auth URL for "%s". This URL contains a refresh token that can be used to authenticate to the org without user interaction. Do you want to continue?
16
+
17
+ # warning.show-sfdx-auth-url
18
+
19
+ This command exposes an SFDX Auth URL. Unlike an access token, this credential contains a refresh token that allows extended access to an org. Avoid sharing or logging this URL. For additional information about org authorization, review https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_url.htm.
20
+
21
+ # error.noRefreshToken
22
+
23
+ An SFDX Auth URL is not available for "%s". This URL is only available for orgs authenticated via a web-based login flow. Re-authenticate to the org using "sf org login web" to make it available.
24
+
25
+ # examples
26
+
27
+ - Show the SFDX Auth URL for the default org:
28
+
29
+ <%= config.bin %> <%= command.id %>
30
+
31
+ - Show the SFDX Auth URL for an org with alias "my-org":
32
+
33
+ <%= config.bin %> <%= command.id %> --target-org my-org
34
+
35
+ - Show the SFDX Auth URL without the confirmation prompt:
36
+
37
+ <%= config.bin %> <%= command.id %> --target-org my-org --no-prompt
38
+
39
+ - Get the SFDX Auth URL as JSON for use in scripts:
40
+
41
+ <%= config.bin %> <%= command.id %> --target-org my-org --json