Skip to content

Commit

Permalink
chore(backend): Introduce SAML connections per org (#4792)
Browse files Browse the repository at this point in the history
Co-authored-by: Izaak Lauer <[email protected]>
  • Loading branch information
LauraBeatris and izaaklauer authored Dec 18, 2024
1 parent aeb5855 commit b3300c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/kind-crews-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/backend': patch
---

Allow to create and update SAML connections with organization IDs.

When users sign in or up using an organization's SAML connection, they're automatically added as members of that organization. For more information, refer to our docs: https://clerk.com/docs/organizations/manage-sso
2 changes: 2 additions & 0 deletions packages/backend/src/api/endpoints/SamlConnectionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type CreateSamlConnectionParams = {
name: string;
provider: SamlIdpSlug;
domain: string;
organizationId?: string;
idpEntityId?: string;
idpSsoUrl?: string;
idpCertificate?: string;
Expand All @@ -31,6 +32,7 @@ type UpdateSamlConnectionParams = {
name?: string;
provider?: SamlIdpSlug;
domain?: string;
organizationId?: string;
idpEntityId?: string;
idpSsoUrl?: string;
idpCertificate?: string;
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/api/resources/JSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ export interface PaginatedResponseJSON {
export interface SamlConnectionJSON extends ClerkResourceJSON {
name: string;
domain: string;
organization_id: string | null;
idp_entity_id: string;
idp_sso_url: string;
idp_certificate: string;
Expand Down
2 changes: 2 additions & 0 deletions packages/backend/src/api/resources/SamlConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export class SamlConnection {
readonly id: string,
readonly name: string,
readonly domain: string,
readonly organizationId: string | null,
readonly idpEntityId: string | null,
readonly idpSsoUrl: string | null,
readonly idpCertificate: string | null,
Expand All @@ -28,6 +29,7 @@ export class SamlConnection {
data.id,
data.name,
data.domain,
data.organization_id,
data.idp_entity_id,
data.idp_sso_url,
data.idp_certificate,
Expand Down

0 comments on commit b3300c8

Please sign in to comment.