updateConnection

abstract suspend fun updateConnection(connectionId: String, request: IB2BUpdateOIDCConnectionParameters): B2BUpdateOIDCConnectionResponse

Updates an existing OIDC SSO connection. Calls the PUT /sdk/v1/b2b/sso/oidc/{connection_id} endpoint. Requires an active session.

Kotlin:

StytchB2B.sso.oidc.updateConnection(
connectionId = "oidc-connection-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
request = B2BUpdateOIDCConnectionParameters(
displayName = "Updated OIDC IdP",
issuer = "https://idp.example.com",
),
)

iOS:

let params = B2BUpdateOIDCConnectionParameters(
displayName: "Updated OIDC IdP",
issuer: "https://idp.example.com"
)
let response = try await StytchB2B.sso.oidc.updateConnection(
connectionId: "oidc-connection-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
request: params
)

React Native:

StytchB2B.sso.oidc.updateConnection(
"oidc-connection-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
{ displayName: "Updated OIDC IdP", issuer: "https://idp.example.com" },
)

Return

B2BUpdateOIDCConnectionResponse containing the updated connection.

Parameters

connectionId

The ID of the OIDC connection to update.

request
  • IB2BUpdateOIDCConnectionParameters

  • displayName? — Human-readable label for the connection.

  • clientId? — The OIDC client ID.

  • clientSecret? — The OIDC client secret.

  • issuer? — The OIDC issuer URL.

  • authorizationUrl? — The OIDC authorization endpoint URL.

  • tokenUrl? — The OIDC token endpoint URL.

  • userinfoUrl? — The OIDC userinfo endpoint URL.

  • jwksUrl? — The OIDC JWKS endpoint URL.

  • identityProvider? — The identity provider type.

  • customScopes? — Additional OIDC scopes to request.

  • attributeMapping? — Map of OIDC claims to Stytch member fields.

Throws

StytchError

if the connection is not found or the request fails.

if the coroutine is cancelled.