Skip to content

Instantly share code, notes, and snippets.

@alexastrum
Last active August 3, 2020 16:41
Show Gist options
  • Save alexastrum/61d7d3defc0246be2119cdef777874ae to your computer and use it in GitHub Desktop.
Save alexastrum/61d7d3defc0246be2119cdef777874ae to your computer and use it in GitHub Desktop.
const alg = "ES256";
const verifyResult = verify(
deviceToken,
alg,
device.data.publicKey
);
if (!verifyResult || header.alg !== alg) {
res.send({
message: "Invalid JWT!",
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment