feat: remove default personal orgs from custom sso (#2741)

This commit is contained in:
David Nguyen
2026-05-05 14:50:07 +10:00
committed by GitHub
parent 6a6ef8d2ad
commit f10d3284ba
9 changed files with 67 additions and 6 deletions
@@ -52,6 +52,7 @@ export const getOrganisationAuthenticationPortal = async ({
wellKnownUrl: true,
autoProvisionUsers: true,
allowedDomains: true,
allowPersonalOrganisations: true,
clientSecret: true,
},
},
@@ -79,6 +80,7 @@ export const getOrganisationAuthenticationPortal = async ({
wellKnownUrl: portal.wellKnownUrl,
autoProvisionUsers: portal.autoProvisionUsers,
allowedDomains: portal.allowedDomains,
allowPersonalOrganisations: portal.allowPersonalOrganisations,
clientSecretProvided: Boolean(portal.clientSecret),
};
};
@@ -14,6 +14,7 @@ export const ZGetOrganisationAuthenticationPortalResponseSchema =
wellKnownUrl: true,
autoProvisionUsers: true,
allowedDomains: true,
allowPersonalOrganisations: true,
}).extend({
/**
* Whether we have the client secret in the database.
@@ -61,6 +61,7 @@ export const updateOrganisationAuthenticationPortalRoute = authenticatedProcedur
wellKnownUrl,
autoProvisionUsers,
allowedDomains,
allowPersonalOrganisations,
} = data;
if (
@@ -104,6 +105,7 @@ export const updateOrganisationAuthenticationPortalRoute = authenticatedProcedur
wellKnownUrl,
autoProvisionUsers,
allowedDomains,
allowPersonalOrganisations,
},
});
});
@@ -14,6 +14,7 @@ export const ZUpdateOrganisationAuthenticationPortalRequestSchema = z.object({
wellKnownUrl: z.union([z.string().url(), z.literal('')]),
autoProvisionUsers: z.boolean(),
allowedDomains: z.array(z.string().regex(domainRegex)),
allowPersonalOrganisations: z.boolean(),
}),
});