Add `utils` dir and generateToken.js utility
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
This commit is contained in:
parent
469880a3fa
commit
b930a8f75f
|
@ -0,0 +1,9 @@
|
||||||
|
var jwt = require('jsonwebtoken');
|
||||||
|
|
||||||
|
var config = require('../config/config');
|
||||||
|
|
||||||
|
var token = jwt.sign({foo: 'bar'}, config.tokenSecret, {
|
||||||
|
expiresInMinutes: config.userTokenExpirePeriod
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(token);
|
Loading…
Reference in New Issue