簡體   English   中英

使用Facebook令牌的Firebase Unity SDK身份驗證

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM