Tag: 游戏中心

如何从第三方node.js服务器validationGame Center用户

我一直在试图获得新的iOS Game Center GKPlayer方法generateIdentityVerificationSignatureWithCompletionHandler ,所以我们可以安全地依靠Game Center凭证进行身份validation。 我们使用Node.js作为后端服务器,我一直在尝试validation签名,但是无济于事。 这里是我有的服务器端的代码 – 如果有人谁可以在什么缺less的钟声,这将不胜感激。 这个问题在这里有所回答: 如何在我的“第三方服务器”上validationGKLocalPlayer? ,但是Node.js并没有被专门的解决。 请注意,以下代码不能确保签名授权(尚)的证书的有效性。 //Client sends the payload below //json.playerId – UTF-8 string //json.bundleId – UTF-8 string //json.timestamp – Hex string //json.salt – base64 encoded //json.publicKeyURL – UTF-8 string //json.signature – base64 encoded var json = JSON.parse(req.body); console.log(JSON.stringify(json)); //get the certificate getCertificate(json.publicKeyURL, function(cert){ //read file […]