@agentconnect.md/setup 2.11.0-rc.13 → 2.11.0-rc.17

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
@@ -36,8 +36,10 @@ An organization that signs in through its own identity provider can choose
36
36
  **Enterprise SSO (OIDC or SAML)** instead of a social provider. Setup first asks
37
37
  Logto to create the connector and shows the redirect URI (OIDC) or the ACS URL
38
38
  and SP entity ID (SAML) to register with the identity provider; the provider's
39
- issuer and client, or its SAML metadata, come next. An identity provider on a
40
- private network also needs its address in `LOGTO_SSRF_ALLOWED_ADDRESSES`.
39
+ issuer and client, or its SAML metadata, come next, together with at least one
40
+ email domain: Logto offers no sign-in through a connector without one. An
41
+ identity provider on a private network also needs its address in
42
+ `LOGTO_SSRF_ALLOWED_ADDRESSES`.
41
43
 
42
44
  ## Run from source
43
45
 
package/dist/index.js CHANGED
@@ -62846,7 +62846,7 @@ const LogtoSsoConnectorSchema = strictObject({
62846
62846
  protocol: _enum(["oidc", "saml"]),
62847
62847
  /** Shown on the console's sign-in button. */
62848
62848
  name: string().trim().min(1).max(64),
62849
- /** Email domains Logto routes to this connector on its own sign-in page. */
62849
+ /** Email domains Logto routes to this connector; Logto offers the connector only once it has one. */
62850
62850
  domains: array(SsoDomainSchema).default([]),
62851
62851
  /** OIDC IdP; the client secret is the write-only 'logto.ssoConnectorClientSecret'. */
62852
62852
  oidc: strictObject({
@@ -62983,6 +62983,15 @@ const DeploymentConfigValuesV1Schema = strictObject({
62983
62983
  ],
62984
62984
  message: "set exactly one of metadataUrl and metadata"
62985
62985
  });
62986
+ if ((sso.oidc || sso.saml) && sso.domains.length === 0) ctx.addIssue({
62987
+ code: "custom",
62988
+ path: [
62989
+ "logto",
62990
+ "ssoConnector",
62991
+ "domains"
62992
+ ],
62993
+ message: "needs at least one email domain once the identity provider is set"
62994
+ });
62986
62995
  }
62987
62996
  if (values.auth.mode === "oidc") {
62988
62997
  if (values.auth.socialProviders.length === 0 && values.auth.sso === null) ctx.addIssue({
@@ -67252,7 +67261,7 @@ const ssoForm = (prefix) => String.raw`
67252
67261
  <label class="field">Or IdP metadata XML<textarea id="${prefix}-metadata" rows="4"></textarea></label>
67253
67262
  <label class="field">Email attribute<input id="${prefix}-email-attribute" autocomplete="off" placeholder="email"></label>
67254
67263
  </div>
67255
- <label class="field">Email domains, comma-separated<input id="${prefix}-domains" autocomplete="off" placeholder="example.com"></label>
67264
+ <label class="field">Email domains (at least one), comma-separated<input id="${prefix}-domains" autocomplete="off" placeholder="example.com" required></label>
67256
67265
  <div class="row"><button id="${prefix}-submit">Save SSO and configure Logto</button></div>
67257
67266
  </div>`;
67258
67267
  const SETUP_HTML = String.raw(_templateObject || (_templateObject = _taggedTemplateLiteral([