@opengeni/config 0.20.1-canary.2 → 0.21.0-canary.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/dist/index.d.ts CHANGED
@@ -770,6 +770,11 @@ declare const SettingsSchema: z.ZodObject<{
770
770
  betterAuthAllowedHosts: z.ZodDefault<z.ZodString>;
771
771
  betterAuthCookieDomain: z.ZodOptional<z.ZodString>;
772
772
  betterAuthTrustedOrigins: z.ZodDefault<z.ZodString>;
773
+ managedAuthSessionSetMode: z.ZodDefault<z.ZodEnum<{
774
+ broker: "broker";
775
+ dual: "dual";
776
+ legacy: "legacy";
777
+ }>>;
773
778
  resendApiKey: z.ZodOptional<z.ZodString>;
774
779
  emailFrom: z.ZodDefault<z.ZodString>;
775
780
  stripeSecretKey: z.ZodOptional<z.ZodString>;
package/dist/index.js CHANGED
@@ -1050,6 +1050,9 @@ var SettingsSchema = z.object({
1050
1050
  betterAuthAllowedHosts: z.string().default(""),
1051
1051
  betterAuthCookieDomain: z.string().optional(),
1052
1052
  betterAuthTrustedOrigins: z.string().default(""),
1053
+ // Rolling browser login-slot compatibility. Repository/deployment default is
1054
+ // deliberately legacy; changing to broker is an operator-authorized rollout.
1055
+ managedAuthSessionSetMode: z.enum(["legacy", "dual", "broker"]).default("legacy"),
1053
1056
  resendApiKey: z.string().optional(),
1054
1057
  emailFrom: z.string().default("OpenGeni <auth@mail.opengeni.ai>"),
1055
1058
  stripeSecretKey: z.string().optional(),
@@ -2056,6 +2059,7 @@ function getSettings() {
2056
2059
  betterAuthAllowedHosts: optional("OPENGENI_BETTER_AUTH_ALLOWED_HOSTS"),
2057
2060
  betterAuthCookieDomain: optional("OPENGENI_BETTER_AUTH_COOKIE_DOMAIN"),
2058
2061
  betterAuthTrustedOrigins: optional("OPENGENI_BETTER_AUTH_TRUSTED_ORIGINS"),
2062
+ managedAuthSessionSetMode: optional("OPENGENI_MANAGED_AUTH_SESSION_SET_MODE"),
2059
2063
  resendApiKey: optional("OPENGENI_RESEND_API_KEY"),
2060
2064
  emailFrom: optional("OPENGENI_EMAIL_FROM"),
2061
2065
  stripeSecretKey: optional("OPENGENI_STRIPE_SECRET_KEY"),
@@ -3850,6 +3854,11 @@ function validateSettings(settings) {
3850
3854
  "OPENGENI_DELEGATION_SECRET is required when OPENGENI_PRODUCT_ACCESS_MODE=managed"
3851
3855
  );
3852
3856
  }
3857
+ if (settings.managedAuthSessionSetMode !== "legacy" && !["local", "test"].includes(settings.environment) && !settings.publicBaseUrl.startsWith("https://")) {
3858
+ throw new Error(
3859
+ "OPENGENI_PUBLIC_BASE_URL must use https when browser session sets are enabled outside local/test"
3860
+ );
3861
+ }
3853
3862
  if (!["local", "test"].includes(settings.environment) && !settings.resendApiKey) {
3854
3863
  throw new Error("OPENGENI_RESEND_API_KEY is required for managed mode outside local/test");
3855
3864
  }