{"action":"opened","issue":{"url":"https://api.github.com/repos/kndt84/passport-cognito/issues/9","repository_url":"https://api.github.com/repos/kndt84/passport-cognito","labels_url":"https://api.github.com/repos/kndt84/passport-cognito/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/kndt84/passport-cognito/issues/9/comments","events_url":"https://api.github.com/repos/kndt84/passport-cognito/issues/9/events","html_url":"https://github.com/kndt84/passport-cognito/issues/9","id":268486642,"number":9,"title":"Cannot read property 'username' of undefined","user":{"login":"alienintheheights","id":682815,"avatar_url":"https://avatars3.githubusercontent.com/u/682815?v=4","gravatar_id":"","url":"https://api.github.com/users/alienintheheights","html_url":"https://github.com/alienintheheights","followers_url":"https://api.github.com/users/alienintheheights/followers","following_url":"https://api.github.com/users/alienintheheights/following{/other_user}","gists_url":"https://api.github.com/users/alienintheheights/gists{/gist_id}","starred_url":"https://api.github.com/users/alienintheheights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alienintheheights/subscriptions","organizations_url":"https://api.github.com/users/alienintheheights/orgs","repos_url":"https://api.github.com/users/alienintheheights/repos","events_url":"https://api.github.com/users/alienintheheights/events{/privacy}","received_events_url":"https://api.github.com/users/alienintheheights/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-25T17:40:55Z","updated_at":"2017-10-25T17:40:55Z","closed_at":null,"author_association":"NONE","body":"The example on the README is throwing an error:\r\n\r\n```\r\n $.ajax({\r\n            type: \"post\",\r\n            url: 'http://localhost:3000/auth/cognito',\r\n            data: { username: \"myname\", password: \"mypass\" }\r\n        })\r\n```\r\n```\r\n\r\n\r\nTypeError: Cannot read property 'username' of undefined\r\n    at CognitoStrategy.authenticate (/mypath/node_modules/passport-cognito/lib/strategy.js:76:26)\r\n    at attempt (/mypath/node_modules/passport/lib/middleware/authenticate.js:361:16)\r\n    at authenticate `\r\n\r\n```\r\nreq.body is null in authenticate()\r\n\r\n\r\n```\r\nCognitoStrategy.prototype.authenticate = function(req, options) {\r\n\r\n  var user = {};\r\n  var username = req.body.username;\r\n  var password = req.body.password;\r\n\r\n```"}}
{"actor":{"display_login":"alienintheheights"}}