Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Unity GameKit: signature does not match the authentication request data

I have a Unity application in which I'm implementing a GameCenter login with PlayFab. I fetch the items and use them in the PlayFab request, which returns me the error 'Authentication failed. Signature does not match the authentication request data'. I've reproduced the request using Insomnia with the same results. I have this exact same flow implemented in another application, which works normally.

I'm positive that the PlayFab verification is correct, and there's indeed an issue with the data being sent, but I can't find any information about this kind of situation anywhere, and I don't know how to either reproduce the verification myself, or how to inspect the data to check for issues.

I have reviewed my app's data on AppstoreConnect and have filled every form, document, and even its store page. I've also checked it's bundle identifier settings to make sure it had all the permissions necessary, which seems to be only GameCenter.

I fetch the authentication items through this code

           try
            {
                Debug.Log("Fetching authentication items");
                var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems();                

                PlayFabGameCenterLogin(fetchItemsResponse);

            }
            catch (Exception ex)
            {
                Debug.Log("Error fetching authentication items: " + ex.Message);

                OnLoginFailure();
            }

Which is then sent to this method to start the login request

static void PlayFabGameCenterLogin(GKIdentityVerificationResponse authenticationItems)
    {
        var request = new LoginWithGameCenterRequest();
        request.CreateAccount = true;
        request.PlayerId = GKLocalPlayer.Local.GamePlayerId;
        request.InfoRequestParameters = new GetPlayerCombinedInfoRequestParams
        {
            GetUserAccountInfo = true
        };

        if (authenticationItems != null)
        {
            request.PublicKeyUrl = authenticationItems.PublicKeyUrl;
            request.Salt = Convert.ToBase64String(authenticationItems.GetSalt());
            request.Signature = Convert.ToBase64String(authenticationItems.GetSignature());
            request.Timestamp = authenticationItems.Timestamp.ToString();
        }
        else
            Debug.Log("Playfab Login with no authentication items");

        // Login
        PlayFabClientAPI.LoginWithGameCenter(request, OnLoginSuccess, (e) =>
        {

I'm on Unity 2022.3.10f1 Apple.Core 3.1.3 Apple.GameKit 2.2.2 Xcode 16.2

I need information on what could be the cause of this, if it's a SDK issue, a lack of filling information somewhere, if it's some data compatibility issue (maybe data on the app that's not the same on the appstoreconnect or developer?), or if it's possible to verify the authentication data manually to investigate.

Update: I was able to make it work by passing the TeamPlayerId instead of the GamePlayerId to PlayFab, but i'm not sure this is a real solution or if it's secure. Most apple documentation tells me to use GamePlayerId unless I want o track users across multiple games. But the fetchItems page says the opposite in case of authentication

Share the teamPlayerID and the bundle ID (see CFBundleIdentifier) with the server. For Apple Arcade games, share the gamePlayerID instead of the teamPlayerID

I'm fine with using the TeamPlayerId if it's safe and correct, but the thing is, my other game uses GamePlayerId and has no issues. I'm confused about what's happening in here

Unity GameKit: signature does not match the authentication request data
 
 
Q