Identifier missing on GameCenter Firebase Auth

Viewed 89

I have implemented auth in PlayGames for Android. When users sign in, their usernames show up under "Identifier" in the fireBase console.

In GameCenter, it does not:

public void AuthenticateToGameCenter(Action onAuthenticationComplete = null)
    {
        Social.localUser.Authenticate(success =>
        {
            Debug.Log("Game Center Initialization Complete - Result: " + success);
            if (onAuthenticationComplete != null)
                onAuthenticationComplete();
        });
    }

    public Task SignInWithGameCenterAsync()
    {
        var credentialTask = Firebase.Auth.GameCenterAuthProvider.GetCredentialAsync();
        var continueTask = credentialTask.ContinueWithOnMainThread((Task<Credential> task) =>
        {
            if (!task.IsCompleted)
                return null;

            if (task.Exception != null)
                Debug.Log("GC Credential Task - Exception: " + task.Exception.Message);

            var credential = task.Result;
            Debug.Log($"credential { task.Result}");

            var loginTask = auth.SignInWithCredentialAsync(credential);
            return loginTask.ContinueWithOnMainThread(handleLoginResult);
        });

        return continueTask;
    }


    private void GameCenterLogin()
    {
        // first initialize, then sign in
        var signinAsync = new Action(() => SignInWithGameCenterAsync());
        AuthenticateToGameCenter(signinAsync);
    }

GameCenterAuth

Am I authing wrong?

0 Answers
Related