Releases: tkhq/swift-sdk
Releases · tkhq/swift-sdk
Release: v1.2.1
Release: v1.2.0
What's Changed
Challenge format ( #1 )
The backend expects the challenge in hex format, and SHA256Digest returns only the raw format.
Now the challenge is properly encoded/formated.
ProxyMiddleware
( #5 ) - ⚠️ Minor Breaking
The ProxyMiddleware
header for the forwarded Turnkey API request has been renamed:
Old | New |
---|---|
X-Forwarded-For |
X-Turnkey-Request-Url |
Ensure your backend is updated to support the new header name if you are using the latest version.
New Contributors
- @ericlewis made their first contribution in #1
Full Changelog: 1.1.0...1.2.0
Release: v1.1.0
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: "[email protected]",
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
Turnkey's swift-sdk
Initial release for Turnkey's swift-sdk
🎉