Skip to content

Instantly share code, notes, and snippets.

@alexastrum
Created August 3, 2020 16:35
Show Gist options
  • Save alexastrum/c0e222f8a1360b09d6221341fe2900fc to your computer and use it in GitHub Desktop.
Save alexastrum/c0e222f8a1360b09d6221341fe2900fc to your computer and use it in GitHub Desktop.
const payloadNonce = Number(JSON.parse(payload).nonce);
const nonce = device.data.nonce;
if (payloadNonce !== nonce) {
res.send({
message: "Invalid nonce!",
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment