【发布时间】:2017-10-09 21:25:24
【问题描述】:
我正在使用 Firebase SDK for Unity。我正在尝试使用 Facebook 凭据进行 Firebase 身份验证,但在 Android 上出现以下错误。 Firebase 控制台中的一切看起来都已正确配置。我已启用 Facebook 作为登录方法并将 OAuth 重定向 URL 添加到我的 Facebook 应用程序配置中。感谢您的帮助。
private void AuthFirebaseFacebook(string token) {
Firebase.Auth.FirebaseAuth auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
Firebase.Auth.Credential credential =
Firebase.Auth.FacebookAuthProvider.GetCredential(token);
auth.SignInWithCredentialAsync(credential).ContinueWith(task => {
if (task.IsCanceled)
{
AtagDebug.Log("SignInWithCredentialAsync was canceled.");
return;
}
if (task.IsFaulted)
{
AtagDebug.Log("SignInWithCredentialAsync encountered an error: " + task.Exception);
return;
}
Firebase.Auth.FirebaseUser newUser = task.Result;
AtagDebug.Log("User signed in successfully: " +
newUser.DisplayName + " " + newUser.UserId);
});
}
SignInWithCredentialAsync encountered an error:
System.AggregateException: Exception of type 'System.AggregateException' was thrown.
Firebase.FirebaseException: An internal error has occurred. [ Access Not Configured. Google Identity Toolkit API has not been used in project 98824003602 before or it is disabled. Enable it by visiting https ]
【问题讨论】:
标签: facebook firebase unity3d firebase-authentication