SWIRLS_
ReferenceSDKClient

Identity Federation

SDK reference for identity federation — Register and manage external identity providers for OIDC federation.

Register and manage external identity providers for OIDC federation.

list

List the OIDC identity providers registered for the active organization.

GET

Usage:

const result = await swirls.client.idp.list()

Output:

FieldTypeDescription
providersobject[]

register

Register an identity provider for the active organization. Activates on the first successful token exchange.

POST

Usage:

const result = await swirls.client.idp.register({
  provider: '...',
  instanceIdentifier: '...',
})

Input:

ParameterTypeRequiredDescription
provider"clerk" | "supabase"Yes
instanceIdentifierstringYes
subjectClaimstringNo

Output:

FieldTypeDescription
idstring
providerstring
instanceIdentifierstring
issuerstring
audiencestring
subjectClaimstring
status"pending" | "active"
createdAtstring

remove

Remove an identity provider from the active organization.

POST

Usage:

const result = await swirls.client.idp.remove({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes

Output:

FieldTypeDescription
removedtrue

On this page