{"action":"closed","issue":{"url":"https://api.github.com/repos/strongloop/loopback-example-user-management/issues/26","repository_url":"https://api.github.com/repos/strongloop/loopback-example-user-management","labels_url":"https://api.github.com/repos/strongloop/loopback-example-user-management/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-example-user-management/issues/26/comments","events_url":"https://api.github.com/repos/strongloop/loopback-example-user-management/issues/26/events","html_url":"https://github.com/strongloop/loopback-example-user-management/issues/26","id":118304379,"number":26,"title":"How do you get \"req.accessToken\"? How do you make that \"accessToken\" is a prop of \"req\"?","user":{"login":"wzup","id":3880497,"avatar_url":"https://avatars.githubusercontent.com/u/3880497?v=3","gravatar_id":"","url":"https://api.github.com/users/wzup","html_url":"https://github.com/wzup","followers_url":"https://api.github.com/users/wzup/followers","following_url":"https://api.github.com/users/wzup/following{/other_user}","gists_url":"https://api.github.com/users/wzup/gists{/gist_id}","starred_url":"https://api.github.com/users/wzup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzup/subscriptions","organizations_url":"https://api.github.com/users/wzup/orgs","repos_url":"https://api.github.com/users/wzup/repos","events_url":"https://api.github.com/users/wzup/events{/privacy}","received_events_url":"https://api.github.com/users/wzup/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-example-user-management/labels/%23review","name":"#review","color":"eeeeee"},{"url":"https://api.github.com/repos/strongloop/loopback-example-user-management/labels/question","name":"question","color":"eeeeee"}],"state":"closed","locked":false,"assignee":{"login":"richardpringle","id":3286504,"avatar_url":"https://avatars.githubusercontent.com/u/3286504?v=3","gravatar_id":"","url":"https://api.github.com/users/richardpringle","html_url":"https://github.com/richardpringle","followers_url":"https://api.github.com/users/richardpringle/followers","following_url":"https://api.github.com/users/richardpringle/following{/other_user}","gists_url":"https://api.github.com/users/richardpringle/gists{/gist_id}","starred_url":"https://api.github.com/users/richardpringle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardpringle/subscriptions","organizations_url":"https://api.github.com/users/richardpringle/orgs","repos_url":"https://api.github.com/users/richardpringle/repos","events_url":"https://api.github.com/users/richardpringle/events{/privacy}","received_events_url":"https://api.github.com/users/richardpringle/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-11-23T01:36:04Z","updated_at":"2016-03-29T21:19:02Z","closed_at":"2016-03-29T21:19:02Z","body":"So you have this line in your example:\r\n\r\n```if (!req.accessToken) return res.sendStatus(401);``` \r\nlink: https://github.com/strongloop/loopback-example-user-management/blob/master/server/boot/routes.js#L45\r\n\r\nOk, looks fine. But how do you push the `accessToken` into `req` so that the `accessToken` can be checked out that way?\r\n\r\nIn your `login` route I only see this. You only return the `accessToken` on the client:\r\n```\r\n      res.render('home', {\r\n        email: req.body.email,\r\n        accessToken: token.id\r\n      });\r\n```\r\nlink https://github.com/strongloop/loopback-example-user-management/blob/master/server/boot/routes.js#L36\r\n\r\nAnd what does happen then? How the `accessToken` is a property of `req`, `req.accessToken`?"}}