Creating a user with an error by email and password, and I can not find the source of the problem.
I use the "Firebase Unity SDK" with auth and database packages.
I followed this tutorial on the Firebase web page.
This is the C # code that I use in my Unity project.
using UnityEngine;
using Firebase.Auth;
public class FirebaseAuthEmail : MonoBehaviour
{
public string email = "abc@gmail.com";
public string password = "abccbe123321";
void Start()
{
FirebaseAuth auth = FirebaseAuth.DefaultInstance;
auth.CreateUserWithEmailAndPasswordAsync(email, password).ContinueWith(
task => {
if (!task.IsCanceled && !task.IsFaulted)
{
Debug.Log("User created");
}
else
{
Debug.Log("User creation failed");
}
if (task.IsCanceled) { Debug.Log("Task canceled"); }
if (task.IsFaulted) { Debug.Log("Task faulted"); }
});
}
}
When I press the play button, I get “User Failure” and “Task Failure”.
I was able to add entries to the database but not create an authenticated user.
And yes, I have enabled Email / Password in the Firebase console.
Thanks in advance
source
share