
node-gamecenter-identity-verifier
This is library to validate a apple's gamecenter identity of localplayer for consuming it in node.js backend server.
Installation
npm install identity-verifier --save
Usage
var verifier = require('gamecenter-identity-verifier');
var identity = {
publicKeyUrl: 'https://valid.apple.com/public/timeout.cer',
timestamp: 1460981421303,
signature: 'PoDwf39DCN464B49jJCU0d9Y0J',
salt: 'saltST==',
playerId: 'G:1111111',
bundleId: 'com.valid.app'
};
verifier.verify(identity, function (err, token) {
if (!err) {
console.log(token);
}
});
Development
tsc --watch
Tests
npm test
or
npm prepare
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.
Inspired by
Release History
- 0.1.1 Fix bug in convert method for timestamp to UInt64BE
- 0.1.0 Initial release