2016-11-19 126 views
4

使用電子郵件和密碼創建用戶失敗,我無法找到問題的根源。Firebase Unity密碼驗證失敗

我正在使用帶有auth和數據庫包的「Firebase Unity SDK」。

我在Firebase網頁上關注此tutorial

這是我在Unity項目中使用的C#代碼。

using UnityEngine; 
using Firebase.Auth; 

public class FirebaseAuthEmail : MonoBehaviour 
{ 
    public string email = "[email protected]"; 
    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"); } 
      }); 
    } 
} 

當我按播放按鈕,我得到「用戶創建失敗」和「任務故障」。

我已經成功地將條目添加到數據庫,但不創建經過身份驗證的用戶。

並且是的,我在Firebase控制檯中輸入了電子郵件/密碼enabled

在此先感謝

回答