{"action":"created","issue":{"url":"https://api.github.com/repos/feathersjs/feathers-authentication/issues/411","repository_url":"https://api.github.com/repos/feathersjs/feathers-authentication","labels_url":"https://api.github.com/repos/feathersjs/feathers-authentication/issues/411/labels{/name}","comments_url":"https://api.github.com/repos/feathersjs/feathers-authentication/issues/411/comments","events_url":"https://api.github.com/repos/feathersjs/feathers-authentication/issues/411/events","html_url":"https://github.com/feathersjs/feathers-authentication/issues/411","id":204379754,"number":411,"title":"JWT Authentication setup failing","user":{"login":"zusamann","id":12589797,"avatar_url":"https://avatars.githubusercontent.com/u/12589797?v=3","gravatar_id":"","url":"https://api.github.com/users/zusamann","html_url":"https://github.com/zusamann","followers_url":"https://api.github.com/users/zusamann/followers","following_url":"https://api.github.com/users/zusamann/following{/other_user}","gists_url":"https://api.github.com/users/zusamann/gists{/gist_id}","starred_url":"https://api.github.com/users/zusamann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zusamann/subscriptions","organizations_url":"https://api.github.com/users/zusamann/orgs","repos_url":"https://api.github.com/users/zusamann/repos","events_url":"https://api.github.com/users/zusamann/events{/privacy}","received_events_url":"https://api.github.com/users/zusamann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-01-31T18:18:43Z","updated_at":"2017-02-01T12:26:45Z","closed_at":null,"body":"Here's my code running on windows 10.\r\n\r\n```js\r\nimport feathers from 'feathers';\r\nimport rest from 'feathers-rest';\r\nimport bodyParser from 'body-parser';\r\nimport auth from 'feathers-authentication';\r\nimport jwt from 'feathers-authentication-jwt';\r\n\r\nconst init = () => {\r\n  const app = feathers();\r\n\r\n  app.configure(rest());\r\n  app.use(bodyParser.json());\r\n  app.use(bodyParser.urlencoded({ extended: true }));\r\n  app.configure(auth({ secret: 'my-secret' }));\r\n  app.configure(jwt());\r\n  app.use('/messages', {\r\n    get(id, params) {\r\n      console.log(params);\r\n      return Promise.resolve({\r\n        id,\r\n        read: false,\r\n        text: 'Feathers is great!',\r\n        createdAt: new Date()\r\n          .getTime()\r\n      });\r\n    }\r\n  });\r\n\r\n  app.listen(3030);\r\n};\r\n\r\nexport const run = () => init();\r\n```\r\n\r\nHave also tried this:\r\n```js\r\nimport feathers from 'feathers';\r\nimport rest from 'feathers-rest';\r\nimport bodyParser from 'body-parser';\r\nimport auth from 'feathers-authentication';\r\n\r\nconst init = () => {\r\n  const app = feathers();\r\n\r\n  app.configure(rest());\r\n  app.use(bodyParser.json());\r\n  app.use(bodyParser.urlencoded({ extended: true }));\r\n  app.configure(auth({ token: { secret: 'my-secret' } }));\r\n  app.use('/messages', {\r\n    get(id, params) {\r\n      console.log(params);\r\n      return Promise.resolve({\r\n        id,\r\n        read: false,\r\n        text: 'Feathers is great!',\r\n        createdAt: new Date()\r\n          .getTime()\r\n      });\r\n    }\r\n  });\r\n\r\n  app.listen(3030);\r\n};\r\n\r\nexport const run = () => init();\r\n```\r\n\r\nGetting this error in both cases:\r\n\r\n```\r\nD:\\code\\playground\\core-new\\feathers\\node_modules\\feathers-authentication\\lib\\services\\token.js:25\r\n    tokenService.before({\r\n                 ^\r\n\r\nTypeError: tokenService.before is not a function\r\n    at EventEmitter.<anonymous> (D:\\code\\playground\\core-new\\feathers\\node_modules\\feathers-authentication\\lib\\services\\token.js:25:18)\r\n    at EventEmitter.configure (D:\\code\\playground\\core-new\\feathers\\node_modules\\feathers\\lib\\application.js:138:8)\r\n    at D:\\code\\playground\\core-new\\feathers\\node_modules\\feathers-authentication\\lib\\index.js:184:11\r\n    at Array.forEach (native)\r\n    at EventEmitter.<anonymous> (D:\\code\\playground\\core-new\\feathers\\node_modules\\feathers-authentication\\lib\\index.js:154:25)\r\n    at EventEmitter.configure (D:\\code\\playground\\core-new\\feathers\\node_modules\\feathers\\lib\\application.js:138:8)\r\n    at init (D:/code/playground/core-new/feathers/server.js:16:7)\r\n    at Object.run (D:/code/playground/core-new/feathers/server.js:44:26)\r\n    at Object.<anonymous> (D:\\code\\playground\\core-new\\feathers\\bootstrap.js:2:21)\r\n    at Module._compile (module.js:570:32)\r\n[nodemon] app crashed - waiting for file changes before starting...\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/feathersjs/feathers-authentication/issues/comments/276645315","html_url":"https://github.com/feathersjs/feathers-authentication/issues/411#issuecomment-276645315","issue_url":"https://api.github.com/repos/feathersjs/feathers-authentication/issues/411","id":276645315,"user":{"login":"marshallswain","id":128857,"avatar_url":"https://avatars.githubusercontent.com/u/128857?v=3","gravatar_id":"","url":"https://api.github.com/users/marshallswain","html_url":"https://github.com/marshallswain","followers_url":"https://api.github.com/users/marshallswain/followers","following_url":"https://api.github.com/users/marshallswain/following{/other_user}","gists_url":"https://api.github.com/users/marshallswain/gists{/gist_id}","starred_url":"https://api.github.com/users/marshallswain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marshallswain/subscriptions","organizations_url":"https://api.github.com/users/marshallswain/orgs","repos_url":"https://api.github.com/users/marshallswain/repos","events_url":"https://api.github.com/users/marshallswain/events{/privacy}","received_events_url":"https://api.github.com/users/marshallswain/received_events","type":"User","site_admin":false},"created_at":"2017-02-01T12:26:45Z","updated_at":"2017-02-01T12:26:45Z","body":"Use the quick start I just linked."}}
{"actor":{"display_login":"marshallswain"}}