Tempo
Tempo
KKinde
Created by Tempo on 11/13/2024 in #💻┃support
Assigning identities when creating a user.
Update: This works in the 'Test Request' environment. Does not work with the SDK when using requstBody.
await kindeSDK.Users.createUser({
requestBody: {
profile: {
given_name: submission.value.newUserFirstName,
family_name: submission.value.newUserLastName
},
organization_code: submission.value.kindeOrgId,
identities: [{
type: "username",
details: {
username: submission.value.newUserUsername
}
}, {
type: "email",
details: {
email: submission.value.newUserEmail,
}
}, {
type: "phone",
details: {
phone: submission.value.newUserPhoneNumber,
phone_country_id: "nz",
}
}]
}
})
await kindeSDK.Users.createUser({
requestBody: {
profile: {
given_name: submission.value.newUserFirstName,
family_name: submission.value.newUserLastName
},
organization_code: submission.value.kindeOrgId,
identities: [{
type: "username",
details: {
username: submission.value.newUserUsername
}
}, {
type: "email",
details: {
email: submission.value.newUserEmail,
}
}, {
type: "phone",
details: {
phone: submission.value.newUserPhoneNumber,
phone_country_id: "nz",
}
}]
}
})
note: the SDK does not error when passing an empty object.
await kindeSDK.Users.createUser({})
await kindeSDK.Users.createUser({})
This however does not include the user details.
2 replies