mirror of
https://git.coolaj86.com/coolaj86/telebit-relay.js.git
synced 2025-02-24 01:48:05 +00:00
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…
x
Reference in New Issue
Block a user