registerByEmail static method
register a new user by email address and a password.
Implementation
static Future<AuthResult> registerByEmail(String email, String password,
[RegisterOptions? options]) async {
var body = {
'connection': 'PASSWORD',
'passwordPayload': {
'email': email,
'password':
Util.encrypt(password, encryptType: options?.passwordEncryptType)
},
};
var jsonBody = jsonEncode(body);
if (options != null) {
jsonBody = jsonEncode(options.setValues(body));
}
final Result result = await post('/api/v3/signup', jsonBody);
// AuthResult authResult = AuthResult(result);
// authResult.user = await createUser(result);
return AuthResult(result);
}