@salesforce/core 8.32.6-eca.1 → 8.32.6-eca.2

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.
Files changed (2) hide show
  1. package/lib/org/authInfo.js +17 -13
  2. package/package.json +1 -1
@@ -725,24 +725,28 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
725
725
  }
726
726
  else {
727
727
  if (this.options.parentUsername) {
728
- const parentFields = await this.loadDecryptedAuthFromConfig(this.options.parentUsername);
729
728
  if (process.env.SF_SCRATCH_SIGNUP_CONNECTED_APP) {
730
- // When the signup app is overridden, use it as the clientId for the auth code exchange
731
- // and skip copying the parent's privateKey so we don't fall into the JWT flow.
729
+ // When the signup app is overridden, use it as the clientId for the auth code exchange.
730
+ // Skip loading parent fields entirely we don't need the parent's privateKey/clientSecret
731
+ // and the parent org may not be in the StateAggregator cache.
732
732
  options.clientId = process.env.SF_SCRATCH_SIGNUP_CONNECTED_APP;
733
+ if (process.env.SFDX_CLIENT_SECRET) {
734
+ options.clientSecret = process.env.SFDX_CLIENT_SECRET;
735
+ }
733
736
  }
734
737
  else {
738
+ const parentFields = await this.loadDecryptedAuthFromConfig(this.options.parentUsername);
735
739
  options.clientId = parentFields.clientId;
736
- }
737
- if (process.env.SFDX_CLIENT_SECRET) {
738
- options.clientSecret = process.env.SFDX_CLIENT_SECRET;
739
- }
740
- else if (!process.env.SF_SCRATCH_SIGNUP_CONNECTED_APP) {
741
- // Grab whatever flow is defined
742
- Object.assign(options, {
743
- clientSecret: parentFields.clientSecret,
744
- privateKey: parentFields.privateKey ? (0, node_path_1.resolve)(parentFields.privateKey) : parentFields.privateKey,
745
- });
740
+ if (process.env.SFDX_CLIENT_SECRET) {
741
+ options.clientSecret = process.env.SFDX_CLIENT_SECRET;
742
+ }
743
+ else {
744
+ // Grab whatever flow is defined
745
+ Object.assign(options, {
746
+ clientSecret: parentFields.clientSecret,
747
+ privateKey: parentFields.privateKey ? (0, node_path_1.resolve)(parentFields.privateKey) : parentFields.privateKey,
748
+ });
749
+ }
746
750
  }
747
751
  }
748
752
  // jwt flow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "8.32.6-eca.1",
3
+ "version": "8.32.6-eca.2",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",