@salesforce/plugin-auth 3.9.26 → 4.1.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/LICENSE.txt +1 -1
- package/README.md +6 -6
- package/lib/commands/org/list/auth.js +1 -1
- package/lib/commands/org/login/access-token.js +1 -1
- package/lib/commands/org/login/jwt.js +1 -1
- package/lib/commands/org/login/sfdx-url.js +1 -1
- package/lib/commands/org/login/web.js +1 -1
- package/lib/commands/org/logout.js +1 -1
- package/lib/common.js +1 -1
- package/lib/hooks/diagnostics.js +1 -1
- package/lib/index.js +1 -1
- package/oclif.manifest.json +1 -161
- package/package.json +4 -7
- package/lib/commands/org/login/device.d.ts +0 -21
- package/lib/commands/org/login/device.js +0 -103
- package/lib/commands/org/login/device.js.map +0 -1
- package/messages/device.login.md +0 -35
package/LICENSE.txt
CHANGED
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ EXAMPLES
|
|
|
107
107
|
$ sf org list auth
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
110
|
+
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.10.0/src/commands/org/list/auth.ts)_
|
|
111
111
|
|
|
112
112
|
## `sf org login access-token`
|
|
113
113
|
|
|
@@ -161,7 +161,7 @@ FLAG DESCRIPTIONS
|
|
|
161
161
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
164
|
+
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.10.0/src/commands/org/login/access-token.ts)_
|
|
165
165
|
|
|
166
166
|
## `sf org login jwt`
|
|
167
167
|
|
|
@@ -252,7 +252,7 @@ FLAG DESCRIPTIONS
|
|
|
252
252
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
255
|
+
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.10.0/src/commands/org/login/jwt.ts)_
|
|
256
256
|
|
|
257
257
|
## `sf org login sfdx-url`
|
|
258
258
|
|
|
@@ -322,7 +322,7 @@ EXAMPLES
|
|
|
322
322
|
$ echo url | sf org login sfdx-url --sfdx-url-stdin
|
|
323
323
|
```
|
|
324
324
|
|
|
325
|
-
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
325
|
+
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.10.0/src/commands/org/login/sfdx-url.ts)_
|
|
326
326
|
|
|
327
327
|
## `sf org login web`
|
|
328
328
|
|
|
@@ -427,7 +427,7 @@ FLAG DESCRIPTIONS
|
|
|
427
427
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
428
428
|
```
|
|
429
429
|
|
|
430
|
-
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
430
|
+
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/3.10.0/src/commands/org/login/web.ts)_
|
|
431
431
|
|
|
432
432
|
## `sf org logout`
|
|
433
433
|
|
|
@@ -493,6 +493,6 @@ FLAG DESCRIPTIONS
|
|
|
493
493
|
All orgs includes Dev Hubs, sandboxes, DE orgs, and expired, deleted, and unknown-status scratch orgs.
|
|
494
494
|
```
|
|
495
495
|
|
|
496
|
-
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
496
|
+
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/3.10.0/src/commands/org/logout.ts)_
|
|
497
497
|
|
|
498
498
|
<!-- commandsstop -->
|
package/lib/common.js
CHANGED
package/lib/hooks/diagnostics.js
CHANGED
package/lib/index.js
CHANGED
package/oclif.manifest.json
CHANGED
|
@@ -352,166 +352,6 @@
|
|
|
352
352
|
"access-token:login:org"
|
|
353
353
|
]
|
|
354
354
|
},
|
|
355
|
-
"org:login:device": {
|
|
356
|
-
"aliases": [
|
|
357
|
-
"force:auth:device:login",
|
|
358
|
-
"auth:device:login"
|
|
359
|
-
],
|
|
360
|
-
"args": {},
|
|
361
|
-
"deprecateAliases": true,
|
|
362
|
-
"description": "Use this command to allow a device to connect to an org.\n\nWhen you run this command, it first displays an 8-digit device code and the URL for verifying the code on your org. The default instance URL is https://login.salesforce.com, so if the org you're authorizing is on a different instance, use the --instance-url. The command waits while you complete the verification. Open a browser and navigate to the displayed verification URL, enter the code, then click Connect. If you aren't already logged into your org, log in, and then you're prompted to allow the device to connect to the org. After you successfully authorize the org, you can close the browser window.",
|
|
363
|
-
"examples": [
|
|
364
|
-
"Authorize an org using a device code, give the org the alias TestOrg1, and set it as your default Dev Hub org:\n<%= config.bin %> <%= command.id %> --set-default-dev-hub --alias TestOrg1",
|
|
365
|
-
"Authorize an org in which you've created a custom connected app with the specified client ID (consumer key):\n<%= config.bin %> <%= command.id %> --client-id <OAuth client id>",
|
|
366
|
-
"Authorize a sandbox org with the specified instance URL:\n<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com"
|
|
367
|
-
],
|
|
368
|
-
"flags": {
|
|
369
|
-
"json": {
|
|
370
|
-
"description": "Format output as json.",
|
|
371
|
-
"helpGroup": "GLOBAL",
|
|
372
|
-
"name": "json",
|
|
373
|
-
"allowNo": false,
|
|
374
|
-
"type": "boolean"
|
|
375
|
-
},
|
|
376
|
-
"flags-dir": {
|
|
377
|
-
"helpGroup": "GLOBAL",
|
|
378
|
-
"name": "flags-dir",
|
|
379
|
-
"summary": "Import flag values from a directory.",
|
|
380
|
-
"hasDynamicHelp": false,
|
|
381
|
-
"multiple": false,
|
|
382
|
-
"type": "option"
|
|
383
|
-
},
|
|
384
|
-
"client-id": {
|
|
385
|
-
"aliases": [
|
|
386
|
-
"clientid"
|
|
387
|
-
],
|
|
388
|
-
"char": "i",
|
|
389
|
-
"deprecateAliases": true,
|
|
390
|
-
"name": "client-id",
|
|
391
|
-
"summary": "OAuth client ID (also called consumer key) of your custom connected app.",
|
|
392
|
-
"hasDynamicHelp": false,
|
|
393
|
-
"multiple": false,
|
|
394
|
-
"type": "option"
|
|
395
|
-
},
|
|
396
|
-
"instance-url": {
|
|
397
|
-
"aliases": [
|
|
398
|
-
"instanceurl"
|
|
399
|
-
],
|
|
400
|
-
"char": "r",
|
|
401
|
-
"deprecateAliases": true,
|
|
402
|
-
"description": "If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.\n\nTo specify a My Domain URL, use the format \"https://<MyDomainName>.my.salesforce.com\".\n\nTo specify a sandbox, set --instance-url to \"https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com\".",
|
|
403
|
-
"name": "instance-url",
|
|
404
|
-
"summary": "URL of the instance that the org lives on.",
|
|
405
|
-
"hasDynamicHelp": false,
|
|
406
|
-
"multiple": false,
|
|
407
|
-
"type": "option"
|
|
408
|
-
},
|
|
409
|
-
"set-default-dev-hub": {
|
|
410
|
-
"aliases": [
|
|
411
|
-
"setdefaultdevhub",
|
|
412
|
-
"setdefaultdevhubusername"
|
|
413
|
-
],
|
|
414
|
-
"char": "d",
|
|
415
|
-
"deprecateAliases": true,
|
|
416
|
-
"name": "set-default-dev-hub",
|
|
417
|
-
"summary": "Set the authenticated org as the default Dev Hub.",
|
|
418
|
-
"allowNo": false,
|
|
419
|
-
"type": "boolean"
|
|
420
|
-
},
|
|
421
|
-
"set-default": {
|
|
422
|
-
"aliases": [
|
|
423
|
-
"setdefaultusername"
|
|
424
|
-
],
|
|
425
|
-
"char": "s",
|
|
426
|
-
"deprecateAliases": true,
|
|
427
|
-
"name": "set-default",
|
|
428
|
-
"summary": "Set the authenticated org as the default that all org-related commands run against.",
|
|
429
|
-
"allowNo": false,
|
|
430
|
-
"type": "boolean"
|
|
431
|
-
},
|
|
432
|
-
"alias": {
|
|
433
|
-
"aliases": [
|
|
434
|
-
"setalias"
|
|
435
|
-
],
|
|
436
|
-
"char": "a",
|
|
437
|
-
"deprecateAliases": true,
|
|
438
|
-
"name": "alias",
|
|
439
|
-
"summary": "Alias for the org.",
|
|
440
|
-
"hasDynamicHelp": false,
|
|
441
|
-
"multiple": false,
|
|
442
|
-
"type": "option"
|
|
443
|
-
},
|
|
444
|
-
"loglevel": {
|
|
445
|
-
"deprecated": {
|
|
446
|
-
"message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
|
|
447
|
-
},
|
|
448
|
-
"hidden": true,
|
|
449
|
-
"name": "loglevel",
|
|
450
|
-
"hasDynamicHelp": false,
|
|
451
|
-
"multiple": false,
|
|
452
|
-
"type": "option"
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
"hasDynamicHelp": false,
|
|
456
|
-
"hidden": true,
|
|
457
|
-
"hiddenAliases": [],
|
|
458
|
-
"id": "org:login:device",
|
|
459
|
-
"pluginAlias": "@salesforce/plugin-auth",
|
|
460
|
-
"pluginName": "@salesforce/plugin-auth",
|
|
461
|
-
"pluginType": "core",
|
|
462
|
-
"strict": true,
|
|
463
|
-
"summary": "Authorize an org using a device code.",
|
|
464
|
-
"enableJsonFlag": true,
|
|
465
|
-
"deprecated": true,
|
|
466
|
-
"isESM": true,
|
|
467
|
-
"relativePath": [
|
|
468
|
-
"lib",
|
|
469
|
-
"commands",
|
|
470
|
-
"org",
|
|
471
|
-
"login",
|
|
472
|
-
"device.js"
|
|
473
|
-
],
|
|
474
|
-
"aliasPermutations": [
|
|
475
|
-
"force:auth:device:login",
|
|
476
|
-
"auth:force:device:login",
|
|
477
|
-
"auth:device:force:login",
|
|
478
|
-
"auth:device:login:force",
|
|
479
|
-
"force:device:auth:login",
|
|
480
|
-
"device:force:auth:login",
|
|
481
|
-
"device:auth:force:login",
|
|
482
|
-
"device:auth:login:force",
|
|
483
|
-
"force:device:login:auth",
|
|
484
|
-
"device:force:login:auth",
|
|
485
|
-
"device:login:force:auth",
|
|
486
|
-
"device:login:auth:force",
|
|
487
|
-
"force:auth:login:device",
|
|
488
|
-
"auth:force:login:device",
|
|
489
|
-
"auth:login:force:device",
|
|
490
|
-
"auth:login:device:force",
|
|
491
|
-
"force:login:auth:device",
|
|
492
|
-
"login:force:auth:device",
|
|
493
|
-
"login:auth:force:device",
|
|
494
|
-
"login:auth:device:force",
|
|
495
|
-
"force:login:device:auth",
|
|
496
|
-
"login:force:device:auth",
|
|
497
|
-
"login:device:force:auth",
|
|
498
|
-
"login:device:auth:force",
|
|
499
|
-
"auth:device:login",
|
|
500
|
-
"device:auth:login",
|
|
501
|
-
"device:login:auth",
|
|
502
|
-
"auth:login:device",
|
|
503
|
-
"login:auth:device",
|
|
504
|
-
"login:device:auth"
|
|
505
|
-
],
|
|
506
|
-
"permutations": [
|
|
507
|
-
"org:login:device",
|
|
508
|
-
"login:org:device",
|
|
509
|
-
"login:device:org",
|
|
510
|
-
"org:device:login",
|
|
511
|
-
"device:org:login",
|
|
512
|
-
"device:login:org"
|
|
513
|
-
]
|
|
514
|
-
},
|
|
515
355
|
"org:login:jwt": {
|
|
516
356
|
"aliases": [
|
|
517
357
|
"force:auth:jwt:grant",
|
|
@@ -1104,5 +944,5 @@
|
|
|
1104
944
|
]
|
|
1105
945
|
}
|
|
1106
946
|
},
|
|
1107
|
-
"version": "
|
|
947
|
+
"version": "4.1.0"
|
|
1108
948
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-auth",
|
|
3
3
|
"description": "plugin for sf auth commands",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@salesforce/plugin-command-reference": "^3.1.79",
|
|
23
23
|
"@salesforce/ts-sinon": "^1.4.31",
|
|
24
24
|
"eslint-plugin-sf-plugin": "^1.20.33",
|
|
25
|
-
"oclif": "^4.22.
|
|
25
|
+
"oclif": "^4.22.59",
|
|
26
26
|
"ts-node": "^10.9.2",
|
|
27
27
|
"typescript": "^5.5.4"
|
|
28
28
|
},
|
|
@@ -75,9 +75,6 @@
|
|
|
75
75
|
},
|
|
76
76
|
"access-token": {
|
|
77
77
|
"description": "authorize an org using an access token"
|
|
78
|
-
},
|
|
79
|
-
"device": {
|
|
80
|
-
"description": "authorize an org using a device code"
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
80
|
},
|
|
@@ -234,7 +231,7 @@
|
|
|
234
231
|
"exports": "./lib/index.js",
|
|
235
232
|
"type": "module",
|
|
236
233
|
"sfdx": {
|
|
237
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/
|
|
238
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/
|
|
234
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/4.1.0.crt",
|
|
235
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/4.1.0.sig"
|
|
239
236
|
}
|
|
240
237
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type AuthFields, type DeviceCodeResponse } from '@salesforce/core';
|
|
2
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
-
export type DeviceLoginResult = (AuthFields & DeviceCodeResponse) | Record<string, never>;
|
|
4
|
-
export default class LoginDevice extends SfCommand<DeviceLoginResult> {
|
|
5
|
-
static readonly summary: string;
|
|
6
|
-
static readonly description: string;
|
|
7
|
-
static readonly examples: string[];
|
|
8
|
-
static readonly aliases: string[];
|
|
9
|
-
static readonly deprecateAliases = true;
|
|
10
|
-
static readonly hidden = true;
|
|
11
|
-
static readonly deprecated = true;
|
|
12
|
-
static readonly flags: {
|
|
13
|
-
'client-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
-
'instance-url': import("@oclif/core/interfaces").OptionFlag<import("url").URL | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
-
'set-default-dev-hub': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
-
'set-default': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
-
alias: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
-
loglevel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
-
};
|
|
20
|
-
run(): Promise<DeviceLoginResult>;
|
|
21
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025, 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 { AuthInfo, DeviceOauthService, Messages, } from '@salesforce/core';
|
|
17
|
-
import { Flags, SfCommand, loglevel, Ux } from '@salesforce/sf-plugins-core';
|
|
18
|
-
import common from '../../../common.js';
|
|
19
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
-
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'device.login');
|
|
21
|
-
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
|
|
22
|
-
export default class LoginDevice extends SfCommand {
|
|
23
|
-
static summary = messages.getMessage('summary');
|
|
24
|
-
static description = messages.getMessage('description');
|
|
25
|
-
static examples = messages.getMessages('examples');
|
|
26
|
-
static aliases = ['force:auth:device:login', 'auth:device:login'];
|
|
27
|
-
static deprecateAliases = true;
|
|
28
|
-
static hidden = true;
|
|
29
|
-
static deprecated = true;
|
|
30
|
-
static flags = {
|
|
31
|
-
'client-id': Flags.string({
|
|
32
|
-
char: 'i',
|
|
33
|
-
summary: commonMessages.getMessage('flags.client-id.summary'),
|
|
34
|
-
deprecateAliases: true,
|
|
35
|
-
aliases: ['clientid'],
|
|
36
|
-
}),
|
|
37
|
-
'instance-url': Flags.url({
|
|
38
|
-
char: 'r',
|
|
39
|
-
summary: commonMessages.getMessage('flags.instance-url.summary'),
|
|
40
|
-
description: commonMessages.getMessage('flags.instance-url.description'),
|
|
41
|
-
deprecateAliases: true,
|
|
42
|
-
aliases: ['instanceurl'],
|
|
43
|
-
}),
|
|
44
|
-
'set-default-dev-hub': Flags.boolean({
|
|
45
|
-
char: 'd',
|
|
46
|
-
summary: commonMessages.getMessage('flags.set-default-dev-hub.summary'),
|
|
47
|
-
deprecateAliases: true,
|
|
48
|
-
aliases: ['setdefaultdevhub', 'setdefaultdevhubusername'],
|
|
49
|
-
}),
|
|
50
|
-
'set-default': Flags.boolean({
|
|
51
|
-
char: 's',
|
|
52
|
-
summary: commonMessages.getMessage('flags.set-default.summary'),
|
|
53
|
-
deprecateAliases: true,
|
|
54
|
-
aliases: ['setdefaultusername'],
|
|
55
|
-
}),
|
|
56
|
-
alias: Flags.string({
|
|
57
|
-
char: 'a',
|
|
58
|
-
summary: commonMessages.getMessage('flags.alias.summary'),
|
|
59
|
-
deprecateAliases: true,
|
|
60
|
-
aliases: ['setalias'],
|
|
61
|
-
}),
|
|
62
|
-
loglevel,
|
|
63
|
-
};
|
|
64
|
-
async run() {
|
|
65
|
-
const { flags } = await this.parse(LoginDevice);
|
|
66
|
-
if (await common.shouldExitCommand(false))
|
|
67
|
-
return {};
|
|
68
|
-
const oauthConfig = {
|
|
69
|
-
loginUrl: await common.resolveLoginUrl(flags['instance-url']?.href),
|
|
70
|
-
clientId: flags['client-id'],
|
|
71
|
-
};
|
|
72
|
-
const deviceOauthService = await DeviceOauthService.create(oauthConfig);
|
|
73
|
-
const loginData = await deviceOauthService.requestDeviceLogin();
|
|
74
|
-
if (this.jsonEnabled()) {
|
|
75
|
-
new Ux().log(JSON.stringify(loginData, null, 2));
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
this.log();
|
|
79
|
-
this.warn('Device Oauth flow is deprecated and will be removed mid January 2026\n');
|
|
80
|
-
this.styledHeader(messages.getMessage('actionRequired'));
|
|
81
|
-
this.log(messages.getMessage('enterCode', [loginData.user_code, loginData.verification_uri]));
|
|
82
|
-
this.log();
|
|
83
|
-
}
|
|
84
|
-
const approval = await deviceOauthService.awaitDeviceApproval(loginData);
|
|
85
|
-
if (approval) {
|
|
86
|
-
const authInfo = await deviceOauthService.authorizeAndSave(approval);
|
|
87
|
-
await authInfo.handleAliasAndDefaultSettings({
|
|
88
|
-
alias: flags.alias,
|
|
89
|
-
setDefault: flags['set-default'],
|
|
90
|
-
setDefaultDevHub: flags['set-default-dev-hub'],
|
|
91
|
-
});
|
|
92
|
-
const fields = authInfo.getFields(true);
|
|
93
|
-
await AuthInfo.identifyPossibleScratchOrgs(fields, authInfo);
|
|
94
|
-
const successMsg = messages.getMessage('success', [fields.username]);
|
|
95
|
-
this.logSuccess(successMsg);
|
|
96
|
-
return { ...fields, ...loginData };
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
return {};
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=device.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../src/commands/org/login/device.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,QAAQ,EACR,kBAAkB,EAClB,QAAQ,GAGT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AAC7E,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,cAAc,CAAC,CAAC;AAClF,MAAM,cAAc,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,UAAU,CAAC,CAAC;AAIpF,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAA4B;IAC5D,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,OAAO,GAAG,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;IAC3E,MAAM,CAAU,gBAAgB,GAAG,IAAI,CAAC;IACxC,MAAM,CAAU,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAU,UAAU,G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K,CAAC,aAAa,CAAC;gBAChC,gBAAgB,EAAE,KAAK,CAAC,qBAAqB,CAAC;aAC/C,CAAC,CAAC;YACH,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACxC,MAAM,QAAQ,CAAC,2BAA2B,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC7D,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAC5B,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC"}
|
package/messages/device.login.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# summary
|
|
2
|
-
|
|
3
|
-
Authorize an org using a device code.
|
|
4
|
-
|
|
5
|
-
# description
|
|
6
|
-
|
|
7
|
-
Use this command to allow a device to connect to an org.
|
|
8
|
-
|
|
9
|
-
When you run this command, it first displays an 8-digit device code and the URL for verifying the code on your org. The default instance URL is https://login.salesforce.com, so if the org you're authorizing is on a different instance, use the --instance-url. The command waits while you complete the verification. Open a browser and navigate to the displayed verification URL, enter the code, then click Connect. If you aren't already logged into your org, log in, and then you're prompted to allow the device to connect to the org. After you successfully authorize the org, you can close the browser window.
|
|
10
|
-
|
|
11
|
-
# examples
|
|
12
|
-
|
|
13
|
-
- Authorize an org using a device code, give the org the alias TestOrg1, and set it as your default Dev Hub org:
|
|
14
|
-
|
|
15
|
-
<%= config.bin %> <%= command.id %> --set-default-dev-hub --alias TestOrg1
|
|
16
|
-
|
|
17
|
-
- Authorize an org in which you've created a custom connected app with the specified client ID (consumer key):
|
|
18
|
-
|
|
19
|
-
<%= config.bin %> <%= command.id %> --client-id <OAuth client id>
|
|
20
|
-
|
|
21
|
-
- Authorize a sandbox org with the specified instance URL:
|
|
22
|
-
|
|
23
|
-
<%= config.bin %> <%= command.id %> --instance-url https://MyDomainName--SandboxName.sandbox.my.salesforce.com
|
|
24
|
-
|
|
25
|
-
# actionRequired
|
|
26
|
-
|
|
27
|
-
Action Required!
|
|
28
|
-
|
|
29
|
-
# enterCode
|
|
30
|
-
|
|
31
|
-
Enter %s device code in this verification URL: %s
|
|
32
|
-
|
|
33
|
-
# success
|
|
34
|
-
|
|
35
|
-
Login successful for %s. You can now close the browser.
|