{"action":"opened","issue":{"url":"https://api.github.com/repos/auth0-samples/auth0-react-sample/issues/18","repository_url":"https://api.github.com/repos/auth0-samples/auth0-react-sample","labels_url":"https://api.github.com/repos/auth0-samples/auth0-react-sample/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/auth0-samples/auth0-react-sample/issues/18/comments","events_url":"https://api.github.com/repos/auth0-samples/auth0-react-sample/issues/18/events","html_url":"https://github.com/auth0-samples/auth0-react-sample/issues/18","id":166521465,"number":18,"title":"Unnecessary `offsetSeconds`","user":{"login":"jiahaog","id":7111741,"avatar_url":"https://avatars.githubusercontent.com/u/7111741?v=3","gravatar_id":"","url":"https://api.github.com/users/jiahaog","html_url":"https://github.com/jiahaog","followers_url":"https://api.github.com/users/jiahaog/followers","following_url":"https://api.github.com/users/jiahaog/following{/other_user}","gists_url":"https://api.github.com/users/jiahaog/gists{/gist_id}","starred_url":"https://api.github.com/users/jiahaog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiahaog/subscriptions","organizations_url":"https://api.github.com/users/jiahaog/orgs","repos_url":"https://api.github.com/users/jiahaog/repos","events_url":"https://api.github.com/users/jiahaog/events{/privacy}","received_events_url":"https://api.github.com/users/jiahaog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-20T08:05:50Z","updated_at":"2016-07-20T08:05:50Z","closed_at":null,"body":"I'm not really sure if I'm missing something, but it appears that `offsetSeconds` does nothing here:\r\n\r\nhttps://github.com/auth0-samples/auth0-react-sample/blob/master/10-Customizing-Lock/src/utils/jwtHelper.js#L16\r\n\r\n```\r\nexport function isTokenExpired(token){\r\n  const date = getTokenExpirationDate(token)\r\n  const offsetSeconds = 0\r\n  if (date === null) {\r\n    return false\r\n  }\r\n  return !(date.valueOf() > (new Date().valueOf() + (offsetSeconds * 1000)))\r\n}\r\n```"}}
{"actor":{"display_login":"jiahaog"}}