-
Notifications
You must be signed in to change notification settings - Fork 359
feat(backend): Deprecate domain
field in favor of domains
on SAML connections/account
#6186
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clerk/backend': minor | ||
--- | ||
|
||
Deprecates `domain` field and introduce `domains`. Now, SAML connections support multiple domains, the `domain` field still supported but it's deprecated and will be removed on a future API version. | ||
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -13,7 +13,9 @@ type SamlConnectionListParams = { | |||||||||
type CreateSamlConnectionParams = { | ||||||||||
name: string; | ||||||||||
provider: SamlIdpSlug; | ||||||||||
/** @deprecated Use `domains` array instead. This field will be removed in a future API version. */ | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Multiple lines for JSDocs, but like a pattern than anything else.
Suggested change
|
||||||||||
domain: string; | ||||||||||
domains: string[]; | ||||||||||
organizationId?: string; | ||||||||||
idpEntityId?: string; | ||||||||||
idpSsoUrl?: string; | ||||||||||
|
@@ -31,7 +33,9 @@ type CreateSamlConnectionParams = { | |||||||||
type UpdateSamlConnectionParams = { | ||||||||||
name?: string; | ||||||||||
provider?: SamlIdpSlug; | ||||||||||
/** @deprecated Use `domains` array instead. This field will be removed in a future API version. */ | ||||||||||
domain?: string; | ||||||||||
domains?: string[]; | ||||||||||
organizationId?: string; | ||||||||||
idpEntityId?: string; | ||||||||||
idpSsoUrl?: string; | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -631,6 +631,7 @@ export interface SamlConnectionJSON extends ClerkResourceJSON { | |
object: typeof ObjectType.SamlConnection; | ||
name: string; | ||
domain: string; | ||
domains: string[]; | ||
Comment on lines
633
to
+634
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add deprecation comments here as well. |
||
organization_id: string | null; | ||
idp_entity_id: string; | ||
idp_sso_url: string; | ||
|
@@ -688,6 +689,7 @@ export interface SamlAccountConnectionJSON extends ClerkResourceJSON { | |
id: string; | ||
name: string; | ||
domain: string; | ||
domains: string[]; | ||
active: boolean; | ||
provider: string; | ||
sync_user_attributes: boolean; | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -14,9 +14,13 @@ export class SamlConnection { | |||||
*/ | ||||||
readonly name: string, | ||||||
/** | ||||||
* The domain of your organization. Sign in flows using an email with this domain will use the connection. | ||||||
* @deprecated The domain of your organization. Sign in flows using an email with this domain will use the connection. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
*/ | ||||||
readonly domain: string, | ||||||
/** | ||||||
* The domains of your organization. Sign in flows using an email with one of these domains will use the connection. | ||||||
*/ | ||||||
readonly domains: string[], | ||||||
/** | ||||||
* The organization ID of the organization. | ||||||
*/ | ||||||
|
@@ -95,6 +99,7 @@ export class SamlConnection { | |||||
data.id, | ||||||
data.name, | ||||||
data.domain, | ||||||
data.domains, | ||||||
data.organization_id, | ||||||
data.idp_entity_id, | ||||||
data.idp_sso_url, | ||||||
|
@@ -121,7 +126,11 @@ export class SamlAccountConnection { | |||||
constructor( | ||||||
readonly id: string, | ||||||
readonly name: string, | ||||||
/** | ||||||
* @deprecated Use `domains` array instead. This field will be removed in a future version. | ||||||
*/ | ||||||
readonly domain: string, | ||||||
readonly domains: string[], | ||||||
readonly active: boolean, | ||||||
readonly provider: string, | ||||||
readonly syncUserAttributes: boolean, | ||||||
|
@@ -135,6 +144,7 @@ export class SamlAccountConnection { | |||||
data.id, | ||||||
data.name, | ||||||
data.domain, | ||||||
data.domains, | ||||||
data.active, | ||||||
data.provider, | ||||||
data.sync_user_attributes, | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.