User Creation
User Creation On the SDK
Requesting an Authentication Code
Creating a User On the Device
let options = SENTUserCreationOptions(authenticationCode: "authCode you received")
Sentiance.shared.createUser(options: options) { result, error in
guard let result = result else {
print ("Error: \(error!.failureReason)")
}
// Use result
}val options = UserCreationOptions.Builder(authenticationCode).build()
Sentiance.getInstance(context).createUser(options).addOnCompleteListener { operation ->
if (operation.isSuccessful) {
val userInfo = operation.result.userInfo
Log.d(TAG, "Created a user with ID: ${userInfo.userId}")
} else {
val error = operation.error
Log.e(TAG, "User creation failed with reason ${error.reason.name}. Details: ${error.details}")
}
import { createUser } from '@sentiance-react-native/core';
try {
const result = await createUser({ authCode: authenticationCode });
console.log(`Created a user with ID: ${result.userInfo.userId}`);
} catch(e) {
console.log(`User creation failed with error: ${e}`);
}Multi-User Support
User Restoration
Last updated