signUpWithEmail method

Future<AuthUser?> signUpWithEmail({
  1. AuthMethod? method,
  2. Future<AuthUser> callType(
    1. AuthUser? authUser
    )?,
})

Implementation

Future<AuthUser?> signUpWithEmail({
  AuthMethod? method,
  Future<AuthUser> Function(AuthUser? authUser)? callType,
}) async {
  _user = await method!.auth();

  // add the auth method type later use
  _authMethodType = method.runtimeType;

  if (callType != null) {
    _user = await callType.call(_user);
    saveUser(_user);
  }
  // cache the jwt token
  return _user;
}