Created
January 20, 2018 15:57
-
-
Save davidbarral/23f84102a3bf542a013b269740ada10a to your computer and use it in GitHub Desktop.
Promisify: node promisify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { promisify } = require("util"); | |
const jwt = require("jsonwebtoken"); | |
const jwtVerify = promisify(jwt.verify); | |
const verifyToken = token => jwtVerify(token, CERTIFICATE, { algorithms: ["RS256"] }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment