save data better
This commit is contained in:
parent
08833123b2
commit
34b86bc7a3
|
@ -86,6 +86,12 @@ module.exports.authenticate = function (opts) {
|
|||
};
|
||||
tokenData.jwt = jwt.sign(tokenData, state.secret);
|
||||
resolve(tokenData);
|
||||
fs.writeFile(path.join(__dirname, 'emails', auth.subject + '.data'), JSON.stringify(tokenData), function (err) {
|
||||
if (err) {
|
||||
console.error('[ERROR] in writing token details');
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
return tokenData;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue