@wix/himalaya-cli 0.1386.0 → 0.1387.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.
@@ -1123,6 +1123,11 @@ function WixOwnerAuthProvider(config) {
1123
1123
  function publicCaptchaKey(key) {
1124
1124
  return { nativeId: key.nativeId, siteKey: key.siteKey, siteKeyId: key.siteKeyId };
1125
1125
  }
1126
+ function pairedEnvSiteId(clientId) {
1127
+ const env = globalThis.process?.env;
1128
+ const siteId = env?.WIX_SITE_ID?.trim().toLowerCase();
1129
+ return siteId && env?.WIX_CLIENT_ID?.trim() === clientId ? siteId : void 0;
1130
+ }
1126
1131
  function boundCaptchaConfig(config) {
1127
1132
  return {
1128
1133
  clientId: config.clientId,
@@ -1154,6 +1159,10 @@ function WixConsumerAuthProvider(config) {
1154
1159
  `WixConsumerAuthProvider: passwordResetUrl must be an http(s) web URL with a host (got "${config.passwordResetUrl}") \u2014 the reset email's link cannot be an app scheme.`
1155
1160
  );
1156
1161
  }
1162
+ if (!config.siteId) {
1163
+ const siteId = pairedEnvSiteId(config.clientId);
1164
+ if (siteId) config = { ...config, siteId };
1165
+ }
1157
1166
  return {
1158
1167
  providerId: "wix-consumer",
1159
1168
  config: {