feat: jwt renew via graphql + users create/authorize UI

This commit is contained in:
Nicolas Giard
2018-10-13 23:22:42 -04:00
parent 3caa842d18
commit 14e34d4346
12 changed files with 742 additions and 376 deletions

View File

@@ -22,7 +22,7 @@ module.exports = {
// Try headers, otherwise cookies for response
if (req.get('content-type') === 'application/json') {
res.headers('new-jwt', newToken.token)
res.set('new-jwt', newToken.token)
} else {
res.cookie('jwt', newToken.token, { expires: moment().add(365, 'days').toDate() })
}