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.