createConnection
abstract suspend fun createConnection(request: IB2BCreateOIDCConnectionParameters): B2BCreateOIDCConnectionResponse
Creates a new OIDC SSO connection for the organization. Calls the POST /sdk/v1/b2b/sso/oidc endpoint. Requires an active session.
Kotlin:
StytchB2B.sso.oidc.createConnection(
B2BCreateOIDCConnectionParameters(
displayName = "My OIDC IdP",
)
)Content copied to clipboard
iOS:
let params = B2BCreateOIDCConnectionParameters(displayName: "My OIDC IdP")
let response = try await StytchB2B.sso.oidc.createConnection(params)Content copied to clipboard
React Native:
StytchB2B.sso.oidc.createConnection({ displayName: "My OIDC IdP" })Content copied to clipboard
Return
B2BCreateOIDCConnectionResponse containing the newly created connection.
Parameters
request
IB2BCreateOIDCConnectionParameters
displayName?— Human-readable label for the connection.identityProvider?— The identity provider type.
Throws
StytchError
if the request fails.
if the coroutine is cancelled.