{"action":"opened","issue":{"url":"https://api.github.com/repos/prescottprue/machinepack-jwt/issues/3","labels_url":"https://api.github.com/repos/prescottprue/machinepack-jwt/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/prescottprue/machinepack-jwt/issues/3/comments","events_url":"https://api.github.com/repos/prescottprue/machinepack-jwt/issues/3/events","html_url":"https://github.com/prescottprue/machinepack-jwt/issues/3","id":110701506,"number":3,"title":"Unable to get the decoded token","user":{"login":"bmwertman","id":2573903,"avatar_url":"https://avatars.githubusercontent.com/u/2573903?v=3","gravatar_id":"","url":"https://api.github.com/users/bmwertman","html_url":"https://github.com/bmwertman","followers_url":"https://api.github.com/users/bmwertman/followers","following_url":"https://api.github.com/users/bmwertman/following{/other_user}","gists_url":"https://api.github.com/users/bmwertman/gists{/gist_id}","starred_url":"https://api.github.com/users/bmwertman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmwertman/subscriptions","organizations_url":"https://api.github.com/users/bmwertman/orgs","repos_url":"https://api.github.com/users/bmwertman/repos","events_url":"https://api.github.com/users/bmwertman/events{/privacy}","received_events_url":"https://api.github.com/users/bmwertman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-09T17:18:10Z","updated_at":"2015-10-09T17:18:10Z","closed_at":null,"body":"I'm using the Mailgun node machine-pack to send an email with a url that has a JWT created using machinepack-jwt in it. When the user clicks \"confirm\" in the generated email it hits my Sails controller method where I want to decode the JWT. \r\n\r\nI keep getting an object with properties that have empty strings as their value. \r\n\r\nEncode method\r\n```\r\nsignup: function (req, res){\r\n    if (!req.param('serviceManager')) {\r\n      res.badRequest('Missing required parameter!');\r\n    } else {\r\n      var Mailgun = require('machinepack-mailgun');\r\n      var JWT = require('machinepack-jwt');\r\n      var newUser = req.param('serviceManager');\r\n      JWT.encode({\r\n        secret: 'my_secret',\r\n        algorithm: 'HS384',\r\n        expires: 2880, //in minutes(two days)\r\n        payload: newUser.email + ':' + newUser.password\r\n      }).exec({\r\n        error: function (err){\r\n          console.log(err);\r\n        },\r\n        success : function (authToken){\r\n          Mailgun.sendHtmlEmail({//my Mailgun send with template that has authToken in it});\r\n```\r\nDecode method\r\n```\r\nconfirm_email: function (req, res){\r\n    if (!req.params[0]) {\r\n      res.badRequest('Missing required parameter!');\r\n    } else {\r\n      var JWT = require('machinepack-jwt');\r\n      var authToken = req.params[0];\r\n      console.log(authToken);\r\n      JWT.decode({\r\n        secret: 'my_secret',\r\n        token: authToken,\r\n        algorithm: 'HS384'\r\n      }).exec({\r\n        error: function (err) {\r\n          res.send(err);\r\n        },\r\n        success: function (decodedToken) {\r\n          res.view('emailconfirmed');\r\n          console.log(decodedToken);// returns { id: '', email: '', role: '', sessionId: '' }\r\n        }\r\n      });\r\n    }\r\n  }\r\n```\r\nWhat I'm expecting is the users email which I've encoded in the sent JWT. Am I doing something wrong?"}}