Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(backend): Introduce SAML connections per org #4792

Merged
merged 7 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading