Version: 1.1.0
What's Changed
Oauth
Support for OAuth endpoints has been added:
getOauthProviders()
createOauthProviders()
deleteOauthProviders()
Sessions
Support for Session endpoints has been added:
createReadOnlySession()
createReadWriteSession()
Non-breaking
emailAuth()
: Added an optionalinvalidateExisting
parameter toemailAuth
for API key invalidation.updateUser()
:updateUser
now supports updating theuserPhoneNumber
field.
⚠️ Breaking
createApiKeys()
:- Now uses
ApiKeyParamsV2
, which introduces a new requiredcurveType
parameter. Existing calls must be updated to provide a value forcurveType
. https://docs.turnkey.com/api#tag/API-Keys/operation/CreateApiKeys
- Now uses
createSubOrganization
:- Now uses
RootUserParamsV4
, which introduces the following changes:- New required
oauthProviders
field: Must be provided as a list of OAuth provider parameters. - New optional
userPhoneNumber
field: Represents the user's phone number in E.164 format. - Updated
apiKeys
type: Now requiresApiKeyParamsV2
instead ofApiKeyParams
.
- New required
- Now uses
Migration Guide: createSubOrganization()
let rootUsers: [Components.Schemas.RootUserParamsV4] = [
.init(
userName: "user1",
userEmail: "user1@example.com",
apiKeys: [
.init(
apiKeyName: "turnkey-demo",
publicKey: apiPublicKey!,
curveType: .API_KEY_CURVE_P256 // New required field
)
],
authenticators: [],
oauthProviders: [] // New required field
)
]
let output = try await client.createSubOrganization(
organizationId: organizationId!,
subOrganizationName: subOrganizationName,
rootUsers: rootUsers,
rootQuorumThreshold: rootQuorumThreshold,
wallet: wallet,
disableEmailRecovery: disableEmailRecovery,
disableEmailAuth: disableEmailAuth,
disableSmsAuth: false, // New optional parameter
disableOtpEmailAuth: false // New optional parameter
)
Full Changelog: 1.0.0...1.1.0