{"action":"created","issue":{"url":"https://api.github.com/repos/supermamon/node-restify-jwt-sample/issues/2","repository_url":"https://api.github.com/repos/supermamon/node-restify-jwt-sample","labels_url":"https://api.github.com/repos/supermamon/node-restify-jwt-sample/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/supermamon/node-restify-jwt-sample/issues/2/comments","events_url":"https://api.github.com/repos/supermamon/node-restify-jwt-sample/issues/2/events","html_url":"https://github.com/supermamon/node-restify-jwt-sample/issues/2","id":316564895,"number":2,"title":"Password in token","user":{"login":"partikule","id":651537,"avatar_url":"https://avatars0.githubusercontent.com/u/651537?v=4","gravatar_id":"","url":"https://api.github.com/users/partikule","html_url":"https://github.com/partikule","followers_url":"https://api.github.com/users/partikule/followers","following_url":"https://api.github.com/users/partikule/following{/other_user}","gists_url":"https://api.github.com/users/partikule/gists{/gist_id}","starred_url":"https://api.github.com/users/partikule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/partikule/subscriptions","organizations_url":"https://api.github.com/users/partikule/orgs","repos_url":"https://api.github.com/users/partikule/repos","events_url":"https://api.github.com/users/partikule/events{/privacy}","received_events_url":"https://api.github.com/users/partikule/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-22T09:47:55Z","updated_at":"2018-05-22T01:51:11Z","closed_at":null,"author_association":"NONE","body":"In case the user sends its password during registration, the register example just adds the password to the base64 token.\r\nI know this is just an example and you don't pretend to provide an introduction to good security practices, but considering that a lot of newbies will just copypasta your code, this point should be at least explained.\r\n\r\n`const token = jwt.sign(req.body, config.JWT_SECRET)`\r\n\r\nshould become something like : \r\n\r\n```\r\n// Only put the username in the token, please read about JWT\r\nlet user = {name: req.body.name}\r\nconst token = jwt.sign(user, config.JWT_SECRET)\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/supermamon/node-restify-jwt-sample/issues/comments/390837422","html_url":"https://github.com/supermamon/node-restify-jwt-sample/issues/2#issuecomment-390837422","issue_url":"https://api.github.com/repos/supermamon/node-restify-jwt-sample/issues/2","id":390837422,"user":{"login":"supermamon","id":6381508,"avatar_url":"https://avatars3.githubusercontent.com/u/6381508?v=4","gravatar_id":"","url":"https://api.github.com/users/supermamon","html_url":"https://github.com/supermamon","followers_url":"https://api.github.com/users/supermamon/followers","following_url":"https://api.github.com/users/supermamon/following{/other_user}","gists_url":"https://api.github.com/users/supermamon/gists{/gist_id}","starred_url":"https://api.github.com/users/supermamon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supermamon/subscriptions","organizations_url":"https://api.github.com/users/supermamon/orgs","repos_url":"https://api.github.com/users/supermamon/repos","events_url":"https://api.github.com/users/supermamon/events{/privacy}","received_events_url":"https://api.github.com/users/supermamon/received_events","type":"User","site_admin":false},"created_at":"2018-05-22T01:51:11Z","updated_at":"2018-05-22T01:51:11Z","author_association":"OWNER","body":"Agreed. Fix coming up."}}
{"actor":{"display_login":"supermamon"}}