Firebase Unity Password Authentication Error

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)
                {
                    // User created
                    Debug.Log("User created");
                }
                else
                {
                    // User creation failed
                    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

+4
source share
1
+6

Source: https://habr.com/ru/post/1661291/


All Articles