【问题标题】:Firebase Unity SDK Auth using Facebook Token使用 Facebook 令牌的 Firebase Unity SDK 身份验证
【发布时间】: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


    【解决方案1】:

    问题是我的一个 Android 插件中有一个过时的 google-services.json。对自己和其他人的注意事项:确保不仅在 Unity 中更新 google-services.json,而且您正在使用的任何插件或外部代码都内置到应用程序中。

    【讨论】:

      猜你喜欢
      • 2018-07-04
      • 1970-01-01
      • 2019-06-28
      • 2018-08-23
      • 1970-01-01
      • 1970-01-01
      • 2017-08-13
      • 1970-01-01
      • 2022-07-16
      相关资源
      最近更新 更多