Skip to content

Instantly share code, notes, and snippets.

@alavers

alavers/app_JWT Secret

Last active August 18, 2016 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save alavers/d9af102ca4cefac1a7e5 to your computer and use it in GitHub Desktop.
Save alavers/d9af102ca4cefac1a7e5 to your computer and use it in GitHub Desktop.
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() {
return jwt.sign({
scope: 'app'
},
SECRET,
{
header: {
kid: KEY_ID
}
});
}
@natanrolnik
Copy link

@alavers I think that it should be header instead of headers

@alavers
Copy link
Author

alavers commented Jun 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment