我正在使用适用于Unity的Firebase SDK。我正在尝试使用Facebook凭据进行Firebase身份验证,但我在Android上遇到以下错误。 Firebase控制台中的所有内容都已正确配置。我已将Facebook作为Sign-In-Method启用,并将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 ]
答案 0 :(得分:0)
问题是我的一个Android插件中有一个过时的google-services.json。自我和他人的注意事项:确保不仅在Unity中更新google-services.json,而且还会在应用程序中内置您正在使用的任何插件或外部代码。