[英]Firebase Unity SDK Auth using Facebook Token
我正在使用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 ]
问题是我的一个Android插件中有一个过时的google-services.json。 自我和其他人的注意事项:确保不仅在Unity中更新google-services.json,而且还要更新应用程序中内置的所有正在使用的插件或外部代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.