Overview
You can customize how new sub-organizations (and users) are created during signup.There are three levels of customization:
- Global defaults in
TurnkeyConfig(applies to all auth methods) - Per-auth-method defaults in
TurnkeyConfig - Per-call overrides passed to signup helpers (OTP, Passkey, OAuth)
CreateSubOrgParams type.
Configure defaults for all auth methods
Set defaults inTurnkeyConfig.auth.createSuborgParams, applying the same parameters across methods.
DemoWalletApp.swift
Customize per authentication method
Provide different parameters for each auth method inTurnkeyConfig.auth.createSuborgParams.
DemoWalletApp.swift
Customize at the function call
You can override defaults at runtime by passingcreateSubOrgParams into signup helpers.This takes precedence over config-level defaults.
Email or SMS OTP
UsecompleteOtp(...) or signUpWithOtp(...) with createSubOrgParams.
OtpFlow.swift
Passkeys
UsesignUpWithPasskey(...) with createSubOrgParams.
PasskeySignup.swift