{"action":"created","issue":{"url":"https://api.github.com/repos/meanjs/mean/issues/389","labels_url":"https://api.github.com/repos/meanjs/mean/issues/389/labels{/name}","comments_url":"https://api.github.com/repos/meanjs/mean/issues/389/comments","events_url":"https://api.github.com/repos/meanjs/mean/issues/389/events","html_url":"https://github.com/meanjs/mean/issues/389","id":56409586,"number":389,"title":"MEAN.js 0.4.0 with token authentication?","user":{"login":"ricardodovalle","id":3634150,"avatar_url":"https://avatars.githubusercontent.com/u/3634150?v=3","gravatar_id":"","url":"https://api.github.com/users/ricardodovalle","html_url":"https://github.com/ricardodovalle","followers_url":"https://api.github.com/users/ricardodovalle/followers","following_url":"https://api.github.com/users/ricardodovalle/following{/other_user}","gists_url":"https://api.github.com/users/ricardodovalle/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardodovalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardodovalle/subscriptions","organizations_url":"https://api.github.com/users/ricardodovalle/orgs","repos_url":"https://api.github.com/users/ricardodovalle/repos","events_url":"https://api.github.com/users/ricardodovalle/events{/privacy}","received_events_url":"https://api.github.com/users/ricardodovalle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meanjs/mean/labels/generator","name":"generator","color":"bfe5bf"},{"url":"https://api.github.com/repos/meanjs/mean/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"lirantal","id":316371,"avatar_url":"https://avatars.githubusercontent.com/u/316371?v=3","gravatar_id":"","url":"https://api.github.com/users/lirantal","html_url":"https://github.com/lirantal","followers_url":"https://api.github.com/users/lirantal/followers","following_url":"https://api.github.com/users/lirantal/following{/other_user}","gists_url":"https://api.github.com/users/lirantal/gists{/gist_id}","starred_url":"https://api.github.com/users/lirantal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lirantal/subscriptions","organizations_url":"https://api.github.com/users/lirantal/orgs","repos_url":"https://api.github.com/users/lirantal/repos","events_url":"https://api.github.com/users/lirantal/events{/privacy}","received_events_url":"https://api.github.com/users/lirantal/received_events","type":"User","site_admin":false},"milestone":null,"comments":18,"created_at":"2015-02-03T17:30:10Z","updated_at":"2015-03-12T12:33:58Z","closed_at":null,"body":"I would like to use MEAN.js with token authentication, but I am a  Node.js beginner and I am porting a Rails app to learn.\r\n\r\nI created a small project and add some features, the `'api/signin'` route is returning the token (`loginToken`) encoded with json web token (`jwt`), but I need help.\r\n\r\nHow to connect and keep Angular session a live using token?\r\nHow to add `express-jwt` and to protect all `/api` route keeping the project organized?\r\nWhat is the correct way to store the secret? `(users.authentication.server.controller.js and strategies/local-token.js)`?\r\nWhat is the correct way to user `signout`?\r\n\r\n*Working on: https://github.com/ricardodovalle/meanjs-token-auth*\r\n\r\nThank you very much.\r\n"},"comment":{"url":"https://api.github.com/repos/meanjs/mean/issues/comments/78471264","html_url":"https://github.com/meanjs/mean/issues/389#issuecomment-78471264","issue_url":"https://api.github.com/repos/meanjs/mean/issues/389","id":78471264,"user":{"login":"jloveland","id":3456708,"avatar_url":"https://avatars.githubusercontent.com/u/3456708?v=3","gravatar_id":"","url":"https://api.github.com/users/jloveland","html_url":"https://github.com/jloveland","followers_url":"https://api.github.com/users/jloveland/followers","following_url":"https://api.github.com/users/jloveland/following{/other_user}","gists_url":"https://api.github.com/users/jloveland/gists{/gist_id}","starred_url":"https://api.github.com/users/jloveland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jloveland/subscriptions","organizations_url":"https://api.github.com/users/jloveland/orgs","repos_url":"https://api.github.com/users/jloveland/repos","events_url":"https://api.github.com/users/jloveland/events{/privacy}","received_events_url":"https://api.github.com/users/jloveland/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T12:33:58Z","updated_at":"2015-03-12T12:33:58Z","body":"I am also interested in this feature. I would like to leverage the backend services API and allow authentication from a mobile app. \r\n\r\nThere seem to be a lot of benefits using token auth such as not needing to keep authentication state, serving front end via CDN, no CSRF, and persistent token store. \r\n\r\nIs there interest in adding this to the generator project?\r\n\r\nhere's a nice blog that discusses token auth:\r\nhttp://code.tutsplus.com/tutorials/token-based-authentication-with-angularjs-nodejs--cms-22543\r\n\r\n"}}