I am getting this error when i create a new user. however the user is created, I don not know how to fix this issue. the following is my code.
var result = await CrossFirebaseAuth.Current.Instance.CreateUserWithEmailAndPasswordAsync(em, pw);
var uid = result.User.Uid;
if (uid != null)
{
User user = new User();
var app = Application.Current as App;
app.ukey = uid;
user.Uid = uid;
user.address = txtaddress.Text;
user.city = txtcity.Text;
user.email = em;
user.first = txtfirstname.Text;
user.phone = txtphone.Text;
user.state = txtstate.Text;
user.zip = txtzip.Text;
user.last = txtlastname.Text;
await CrossCloudFirestore.Current
.Instance
.Collection("users")
.AddAsync<User>(user);
await Navigation.PushModalAsync(new ToolPage());
}
else
{
await DisplayAlert("Error", "User cant be created ", "OK");
}
}
catch (Exception ex)
{
await DisplayAlert("Error", ex.Message, "OK");
}
}
else
{
await DisplayAlert("Error", "Email/password cant be blank", "OK");
}
I am getting this error when i create a new user. however the user is created, I don not know how to fix this issue. the following is my code.
var result = await CrossFirebaseAuth.Current.Instance.CreateUserWithEmailAndPasswordAsync(em, pw);
var uid = result.User.Uid;
if (uid != null)
{
User user = new User();
var app = Application.Current as App;
app.ukey = uid;
user.Uid = uid;
user.address = txtaddress.Text;
user.city = txtcity.Text;
user.email = em;
user.first = txtfirstname.Text;
user.phone = txtphone.Text;
user.state = txtstate.Text;
user.zip = txtzip.Text;
user.last = txtlastname.Text;
await CrossCloudFirestore.Current
.Instance
.Collection("users")