0
votes

I am using the Firebase SDK for Unity. I am trying to do Firebase auth using Facebook credentials but I am getting the below error on Android. Everything looks configured properly in the Firebase Console. I have enabled Facebook as a Sign-In-Method and added the OAuth redirect URL to my Facebook app configuration. Thank you for any help.

 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 ]
1

1 Answers

0
votes

The problem was I had an outdated google-services.json in one of my Android Plugins. Note to self and others: Be sure to update the google-services.json not only in Unity, but any plugins or external code you are using that gets built into the app.