Sandsten Sandsten - 1 year ago 172
C# Question

Firebase Unity password authentication failed

The creation of a user with email and password fails and I can't find the source of the problem.

I'm using "Firebase Unity SDK" with the auth and database packages.

I followed this tutorial on the Firebase web page.

This is the C# code I use in my Unity project.

using UnityEngine;
using Firebase.Auth;

public class FirebaseAuthEmail : MonoBehaviour
public string email = "";
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");
// 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 creation failed" and "Task faulted".

I've successfully managed to add entries to the database but not to create an authenticated user.

And yes I've enabled Email/Password in the Firebase console.

Thanks in advance

Answer Source

Firebase Auth doesn't work on Unity Editor.