{"action":"created","issue":{"url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/96","labels_url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/96/comments","events_url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/96/events","html_url":"https://github.com/auth0/node-jsonwebtoken/issues/96","id":87929018,"number":96,"title":"iat and exp properties of decoded object are undefined","user":{"login":"wilsonbalderrama","id":2624545,"avatar_url":"https://avatars.githubusercontent.com/u/2624545?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonbalderrama","html_url":"https://github.com/wilsonbalderrama","followers_url":"https://api.github.com/users/wilsonbalderrama/followers","following_url":"https://api.github.com/users/wilsonbalderrama/following{/other_user}","gists_url":"https://api.github.com/users/wilsonbalderrama/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonbalderrama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonbalderrama/subscriptions","organizations_url":"https://api.github.com/users/wilsonbalderrama/orgs","repos_url":"https://api.github.com/users/wilsonbalderrama/repos","events_url":"https://api.github.com/users/wilsonbalderrama/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonbalderrama/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-13T04:44:07Z","updated_at":"2015-06-13T14:32:58Z","closed_at":null,"body":"    var token = jwt.sign('hello', secret, expiration);\r\n    var decoded = jwt.decode(token);\r\n\r\n    console.log(decoded.iat); // undefined\r\n    console.log(decoded.exp); // undefined\r\n\r\nNot sure if iat and exp should display anything but undefined when a string payload is sent instead of an object."},"comment":{"url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/comments/111713517","html_url":"https://github.com/auth0/node-jsonwebtoken/issues/96#issuecomment-111713517","issue_url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/96","id":111713517,"user":{"login":"jfromaniello","id":178512,"avatar_url":"https://avatars.githubusercontent.com/u/178512?v=3","gravatar_id":"","url":"https://api.github.com/users/jfromaniello","html_url":"https://github.com/jfromaniello","followers_url":"https://api.github.com/users/jfromaniello/followers","following_url":"https://api.github.com/users/jfromaniello/following{/other_user}","gists_url":"https://api.github.com/users/jfromaniello/gists{/gist_id}","starred_url":"https://api.github.com/users/jfromaniello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfromaniello/subscriptions","organizations_url":"https://api.github.com/users/jfromaniello/orgs","repos_url":"https://api.github.com/users/jfromaniello/repos","events_url":"https://api.github.com/users/jfromaniello/events{/privacy}","received_events_url":"https://api.github.com/users/jfromaniello/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T14:32:58Z","updated_at":"2015-06-13T14:32:58Z","body":"The signed token in this case will not have exp/iat because it is an string. Try signing a JSON instead"}}