【问题标题】:Identifier missing on GameCenter Firebase AuthGameCenter Firebase 身份验证上缺少标识符
【发布时间】:2022-09-28 01:54:17
【问题描述】:

我已经在 PlayGames for Android 中实现了身份验证。当用户登录时,他们的用户名会显示在 fireBase 控制台中的“标识符”下。

在 GameCenter 中,它不会:

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);
    }

我错了吗?

    标签: c# firebase unity3d firebase-authentication


    【解决方案1】:

    很抱歉回答而不是评论,但显然我没有足够的声誉(?)。你找到解决问题的方法了吗?为了将 Firebase 和 GameCenter 与 Unity 应用程序连接起来,您还执行了哪些其他步骤?

    【讨论】:

    猜你喜欢
    • 2017-03-19
    • 1970-01-01
    • 2017-04-14
    • 2021-12-19
    • 2017-10-29
    • 2016-02-29
    • 1970-01-01
    • 2015-06-01
    • 2018-11-20
    相关资源
    最近更新 更多