{"action":"opened","issue":{"url":"https://api.github.com/repos/eggjs/egg/issues/3159","repository_url":"https://api.github.com/repos/eggjs/egg","labels_url":"https://api.github.com/repos/eggjs/egg/issues/3159/labels{/name}","comments_url":"https://api.github.com/repos/eggjs/egg/issues/3159/comments","events_url":"https://api.github.com/repos/eggjs/egg/issues/3159/events","html_url":"https://github.com/eggjs/egg/issues/3159","id":377220519,"node_id":"MDU6SXNzdWUzNzcyMjA1MTk=","number":3159,"title":"passport-local中间件使用问题","user":{"login":"coolicer","id":811078,"node_id":"MDQ6VXNlcjgxMTA3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/811078?v=4","gravatar_id":"","url":"https://api.github.com/users/coolicer","html_url":"https://github.com/coolicer","followers_url":"https://api.github.com/users/coolicer/followers","following_url":"https://api.github.com/users/coolicer/following{/other_user}","gists_url":"https://api.github.com/users/coolicer/gists{/gist_id}","starred_url":"https://api.github.com/users/coolicer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolicer/subscriptions","organizations_url":"https://api.github.com/users/coolicer/orgs","repos_url":"https://api.github.com/users/coolicer/repos","events_url":"https://api.github.com/users/coolicer/events{/privacy}","received_events_url":"https://api.github.com/users/coolicer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-05T01:32:45Z","updated_at":"2018-11-05T01:32:45Z","closed_at":null,"author_association":"NONE","body":"\r\n\r\n* **Node Version**:\r\nv8.10.0\r\n* **Egg Version**:\r\n2.2.1\r\n* **Plugin Name**:\r\negg-passport-local\r\n* **Plugin Version**:\r\n1.2.1\r\n* **Platform**:\r\nMac\r\n* **Mini Showcase Repository**:\r\n\r\n<!-- Enter your issue details below this comment. -->\r\n这样跑得了\r\n```js\r\nrouter.get('/authCallback', controller.users.authenticate);\r\nrouter.post('/authenticate', app.passport.authenticate('local', { successRedirect: '/authCallback' }));\r\n```\r\n\r\n但是改成\r\n\r\n```js\r\nrouter.post('/authenticate', app.passport.authenticate('local'), controller.users.authenticate);\r\n```\r\n就不行了，不能作为中间件使用吗？\r\n"}}
{"actor":{"display_login":"coolicer"}}