mirror of
https://github.com/plankanban/planka.git
synced 2025-12-20 09:15:39 +03:00
Project managers, board members, auto-update after reconnection, refactoring
This commit is contained in:
16
server/api/helpers/utils/sign-token.js
Normal file
16
server/api/helpers/utils/sign-token.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const jwt = require('jsonwebtoken');
|
||||
|
||||
module.exports = {
|
||||
sync: true,
|
||||
|
||||
inputs: {
|
||||
payload: {
|
||||
type: 'json',
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
fn(inputs) {
|
||||
return jwt.sign(inputs.payload, sails.config.session.secret);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user