-
-
Save alavers/8f07b03895333d83b454 to your computer and use it in GitHub Desktop.
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
var jwt = require('jsonwebtoken'); | |
// Generate your own secret key for your app here https://app.supportkit.io | |
var KEY_ID = '55e9f9bf7a0ce5ca2d429c17'; | |
var SECRET = 'BFJJ88naxc5PZNAMU9KpBNTR'; | |
var signJwt = function(userId) { | |
return jwt.sign({ | |
scope: 'appUser', | |
userId: userId | |
}, | |
SECRET, | |
{ | |
header: { | |
kid: KEY_ID | |
} | |
}); | |
} |
AhmadIbrahiim
commented
May 29, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment