I follow the link reply.
https://community.playfab.com/questions/40458/gamecenter-linking-fails-with-mysterious-error.html
but this code still not working.
How can i get signature code?
Social.localUser.Authenticate((bSuccess, msg) => { GameCenterSignature.Generate(OnSucceeded, OnFailed); }); [MonoPInvokeCallback(typeof(GameCenterSignature.OnSucceeded))] private static void OnSucceeded(string PublicKeyUrl, ulong timestamp, string signature, string salt, string playerID, string alias, string bundleID) { Debug.Log("Succeeded authorization to gamecenter: \n" + "PublicKeyUrl=" + PublicKeyUrl + "\n" + "timestamp=" + timestamp + "\n" + "signature=" + signature + "\n" + "salt=" + salt + "\n" + "playerID=" + playerID + "\n" + "alias=" + alias + "\n" + "bundleID=" + bundleID); var gamecenterRequest = new LoginWithGameCenterRequest() { PublicKeyUrl = PublicKeyUrl, Salt = salt, Signature = signature, Timestamp = timestamp.ToString(), TitleId = PlayFabSettings.TitleId, PlayerId = playerID; }; PlayFabClientAPI.LoginWithGameCenter(gamecenterRequest, result => { response.IsSucceeded = true; }, error => { }); }
Answer by Sarah Zhang · Dec 14, 2020 at 02:53 AM
Could you please provide the specific error messages?
Thank you for checking.
The error is signature does not match authentication request data.
I think, PlayFabClientAPI.LoginWithGameCenter has error. Because i used another get signature code (https://gist.github.com/BastianBlokland/bbc02a407b05beaf3f55ead3dd10f808), Also got same error. Thank you
Thanks for the reply. Typically, this error means the signature doesn't match the salt, timestamp, bundleId or playerId. You can try to check whether they are correct one by one. The bundleId is the one you set in the PlayFab Add-ons page. It should be the same as the returned bundleID.
Thanks for the cheking. I don't know about correct salt, timestamp, signature and playerId. I just know bundleId. How can i check are they one by one? Also I already set Apple in PlayFab Add-ons. Please check and reply. Thank you.
PlayFab uses the method under the Discussion of this documentation-- https://developer.apple.com/documentation/gamekit/gklocalplayer/1515407-generateidentityverificationsign to verify the signature. Could you please follow the method to verify if the hash value matches the signature parameter?