File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Examples/swift-demo-wallet/example-server/src Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export async function verifyOtp(
103103export async function createSubOrg (
104104 req : Request < { } , { } , CreateSubOrgParams >
105105) : Promise < CreateSubOrgResponse > {
106- const { passkey, apiKeys } = req . body ;
106+ const { email , phone , passkey, apiKeys } = req . body ;
107107
108108 const authenticators = passkey
109109 ? [
@@ -115,14 +115,19 @@ export async function createSubOrg(
115115 ]
116116 : [ ] ;
117117
118+ let userEmail = email ;
119+ const userPhoneNumber = phone ;
120+
118121 const subOrganizationName = `Sub Org - ${ new Date ( ) . toISOString ( ) } ` ;
119122
120123 const result = await turnkey . createSubOrganization ( {
121124 organizationId : turnkeyConfig . defaultOrganizationId ,
122125 subOrganizationName,
123126 rootUsers : [
124127 {
125- userName : "Passkey User" ,
128+ userName : "User" ,
129+ userEmail,
130+ userPhoneNumber,
126131 authenticators,
127132 apiKeys : apiKeys ?? [ ] ,
128133 oauthProviders : [ ] ,
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ export type SendOtpResponse = {
3737} ;
3838
3939export type CreateSubOrgParams = {
40+ email : string ;
41+ phone ?: string ;
4042 passkey ?: {
4143 name ?: string ;
4244 challenge : string ;
You can’t perform that action at this time.
0 commit comments