{"action":"created","issue":{"url":"https://api.github.com/repos/mebjas/CSRF-Protector-PHP/issues/5","labels_url":"https://api.github.com/repos/mebjas/CSRF-Protector-PHP/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/mebjas/CSRF-Protector-PHP/issues/5/comments","events_url":"https://api.github.com/repos/mebjas/CSRF-Protector-PHP/issues/5/events","html_url":"https://github.com/mebjas/CSRF-Protector-PHP/issues/5","id":35087725,"number":5,"title":"What to do in case token expires","user":{"login":"mebjas","id":3007365,"avatar_url":"https://avatars.githubusercontent.com/u/3007365?v=3","gravatar_id":"","url":"https://api.github.com/users/mebjas","html_url":"https://github.com/mebjas","followers_url":"https://api.github.com/users/mebjas/followers","following_url":"https://api.github.com/users/mebjas/following{/other_user}","gists_url":"https://api.github.com/users/mebjas/gists{/gist_id}","starred_url":"https://api.github.com/users/mebjas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mebjas/subscriptions","organizations_url":"https://api.github.com/users/mebjas/orgs","repos_url":"https://api.github.com/users/mebjas/repos","events_url":"https://api.github.com/users/mebjas/events{/privacy}","received_events_url":"https://api.github.com/users/mebjas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mebjas/CSRF-Protector-PHP/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/mebjas/CSRF-Protector-PHP/labels/next%20ver","name":"next ver","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-06-05T19:13:09Z","updated_at":"2015-02-06T11:43:00Z","closed_at":null,"body":"csrf token has an expiry time. let us assume its 5 minutes. And after loading a page, user did spend 5 minutes somewhere else before making another request.\r\n\r\nNow when user makes a request, say he submits a form, the js code fetches the token from cookie before submitting the form. So what need to be done in this case?\r\n\r\nPossible solutions: \r\n1. issue a quick xhr request to request for token refresh\r\n2. let the request proceed without a token and let ir fail ??? :octocat: "},"comment":{"url":"https://api.github.com/repos/mebjas/CSRF-Protector-PHP/issues/comments/73225004","html_url":"https://github.com/mebjas/CSRF-Protector-PHP/issues/5#issuecomment-73225004","issue_url":"https://api.github.com/repos/mebjas/CSRF-Protector-PHP/issues/5","id":73225004,"user":{"login":"mebjas","id":3007365,"avatar_url":"https://avatars.githubusercontent.com/u/3007365?v=3","gravatar_id":"","url":"https://api.github.com/users/mebjas","html_url":"https://github.com/mebjas","followers_url":"https://api.github.com/users/mebjas/followers","following_url":"https://api.github.com/users/mebjas/following{/other_user}","gists_url":"https://api.github.com/users/mebjas/gists{/gist_id}","starred_url":"https://api.github.com/users/mebjas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mebjas/subscriptions","organizations_url":"https://api.github.com/users/mebjas/orgs","repos_url":"https://api.github.com/users/mebjas/repos","events_url":"https://api.github.com/users/mebjas/events{/privacy}","received_events_url":"https://api.github.com/users/mebjas/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T11:43:00Z","updated_at":"2015-02-06T11:43:00Z","body":"#todo: Create a wiki page, mentioning this case and suggesting possible actions to developers!"}}