Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var gcVerifier = require("gamecenter-identity-verifier")
- var identity = {"signature":"ZGc0qwJwgBw6XTnFehOC72k/LVJp4VR7CepPOhYHcS3OxqpvVlBFiKsl/HowE6hcNP0tn/uC/pasHQof3W+vjTXjoCQZk8n+LC0U+32FkaLi0rzC9vZ6Hkr2GQVGFhkPecUbG+YEiFVvj3XAqvg+/6xcSTF0FqVQ/udEpzofHofNxk6kPmZIzhEYOVudslRloyDO4DaIFGx1XCLlZco8c1NEVVZxal1xADk5RIjgTY123Lj59CwJa1ma8tXQQ/QWqcDIgjGqggYuhBhtNlJj1SX4hl7Lpvya/JwdjNV69dxkSNaQzogQX+EmN2NMtCw67X3MdPQ2y1pXoIm8jIwYJA==","publicKeyUrl":"https://static.gc.apple.com/public-key/gc-prod-4.cer","timestamp":"1556010428749","playerId":"G:1323375045","salt":"Zs5Blg==", "bundleId":"net.tests.numbako"}
- var verifier = new Promise(function(resolve, reject) {
- gcVerifier.verify(identity, function (err, token) {
- if (!err) {
- resolve(token);
- }
- else {
- reject();
- }
- });
- });
- async function waitVerification() {
- const res = await verifier.then(function(data) {
- return data;
- }).catch(function() {return "21321"});
- return res;
- }
- const verificationResult = await waitVerification();
- console.log(verificationResult);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement