You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
waterlock/lib/controllers/actions/jwt.js
var moment = require('moment');
var config = require('../../waterlock').config;
var uuid = require('node-uuid');
var jwt = require('jwt-simple');
/**
jwt action
creates a new token if a session is authenticated
GET /user/jwt
_/
module.exports = function(req, res){ _console.log(config); //this prints 'undefined'*
if(!req.session.authenticated){
return res.forbidden('You are not authorized.');
}
Hey davidrivera, when i try to get the json web token of a authenticated user i get a 500 error TypeError: Cannot read property 'jsonWebTokens' of undefined at module.exports (/home/ubuntu/workspace/radapi/node_modules/waterlock/lib/controllers/actions/jwt.js:21:26)
i place a console.log to see what was coming in that value. and it comes undefined.
but when i lift sails it shows the proper information.
The text was updated successfully, but these errors were encountered:
waterlock/lib/controllers/actions/jwt.js
var moment = require('moment');
var config = require('../../waterlock').config;
var uuid = require('node-uuid');
var jwt = require('jwt-simple');
/**
_/
module.exports = function(req, res){
_console.log(config); //this prints 'undefined'*
if(!req.session.authenticated){
return res.forbidden('You are not authorized.');
}
Hey davidrivera, when i try to get the json web token of a authenticated user i get a 500 error
TypeError: Cannot read property 'jsonWebTokens' of undefined at module.exports
(/home/ubuntu/workspace/radapi/node_modules/waterlock/lib/controllers/actions/jwt.js:21:26)
i place a console.log to see what was coming in that value. and it comes undefined.
but when i lift sails it shows the proper information.
The text was updated successfully, but these errors were encountered: