{"action":"created","issue":{"url":"https://api.github.com/repos/pusher/pusher-js/issues/94","labels_url":"https://api.github.com/repos/pusher/pusher-js/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/pusher/pusher-js/issues/94/comments","events_url":"https://api.github.com/repos/pusher/pusher-js/issues/94/events","html_url":"https://github.com/pusher/pusher-js/pull/94","id":54530236,"number":94,"title":"Update authorizer to support CSRF tokens","user":{"login":"framerate","id":74291,"avatar_url":"https://avatars.githubusercontent.com/u/74291?v=3","gravatar_id":"","url":"https://api.github.com/users/framerate","html_url":"https://github.com/framerate","followers_url":"https://api.github.com/users/framerate/followers","following_url":"https://api.github.com/users/framerate/following{/other_user}","gists_url":"https://api.github.com/users/framerate/gists{/gist_id}","starred_url":"https://api.github.com/users/framerate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framerate/subscriptions","organizations_url":"https://api.github.com/users/framerate/orgs","repos_url":"https://api.github.com/users/framerate/repos","events_url":"https://api.github.com/users/framerate/events{/privacy}","received_events_url":"https://api.github.com/users/framerate/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-16T01:42:13Z","updated_at":"2015-01-16T10:23:11Z","closed_at":"2015-01-16T01:59:18Z","pull_request":{"url":"https://api.github.com/repos/pusher/pusher-js/pulls/94","html_url":"https://github.com/pusher/pusher-js/pull/94","diff_url":"https://github.com/pusher/pusher-js/pull/94.diff","patch_url":"https://github.com/pusher/pusher-js/pull/94.patch"},"body":"We use CSRF for security and I didn't see a way to make it play nice with Pusher.\r\n\r\nSo now, if you need CSRF in your authEndpoint:\r\n\r\n```\r\nvar pusher = new Pusher('YOUR_SECRET',\r\n        {\r\n            csrf: $('meta[name=\\'csrf-param\\']').attr('content'),  // or however you normally get your token client-side...\r\n            authEndpoint: '/_api/handshake'\r\n        });\r\n```\r\n\r\nLet me know if you need anything else from me!"},"comment":{"url":"https://api.github.com/repos/pusher/pusher-js/issues/comments/70234521","html_url":"https://github.com/pusher/pusher-js/pull/94#issuecomment-70234521","issue_url":"https://api.github.com/repos/pusher/pusher-js/issues/94","id":70234521,"user":{"login":"pl","id":69904,"avatar_url":"https://avatars.githubusercontent.com/u/69904?v=3","gravatar_id":"","url":"https://api.github.com/users/pl","html_url":"https://github.com/pl","followers_url":"https://api.github.com/users/pl/followers","following_url":"https://api.github.com/users/pl/following{/other_user}","gists_url":"https://api.github.com/users/pl/gists{/gist_id}","starred_url":"https://api.github.com/users/pl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pl/subscriptions","organizations_url":"https://api.github.com/users/pl/orgs","repos_url":"https://api.github.com/users/pl/repos","events_url":"https://api.github.com/users/pl/events{/privacy}","received_events_url":"https://api.github.com/users/pl/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T10:23:11Z","updated_at":"2015-01-16T10:23:11Z","body":"It's also documented in the README: https://github.com/pusher/pusher-js#auth-hash"}}