{"action":"created","issue":{"url":"https://api.github.com/repos/Stamplay/stamplay-js-sdk/issues/24","repository_url":"https://api.github.com/repos/Stamplay/stamplay-js-sdk","labels_url":"https://api.github.com/repos/Stamplay/stamplay-js-sdk/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/Stamplay/stamplay-js-sdk/issues/24/comments","events_url":"https://api.github.com/repos/Stamplay/stamplay-js-sdk/issues/24/events","html_url":"https://github.com/Stamplay/stamplay-js-sdk/issues/24","id":140841429,"number":24,"title":"How to get a user JWT token for HTTP post on my app?","user":{"login":"hughred22","id":2126155,"avatar_url":"https://avatars.githubusercontent.com/u/2126155?v=3","gravatar_id":"","url":"https://api.github.com/users/hughred22","html_url":"https://github.com/hughred22","followers_url":"https://api.github.com/users/hughred22/followers","following_url":"https://api.github.com/users/hughred22/following{/other_user}","gists_url":"https://api.github.com/users/hughred22/gists{/gist_id}","starred_url":"https://api.github.com/users/hughred22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughred22/subscriptions","organizations_url":"https://api.github.com/users/hughred22/orgs","repos_url":"https://api.github.com/users/hughred22/repos","events_url":"https://api.github.com/users/hughred22/events{/privacy}","received_events_url":"https://api.github.com/users/hughred22/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-03-15T01:13:08Z","updated_at":"2016-03-16T07:00:04Z","closed_at":null,"body":"After user login, I need to get the current JWT token, store it somewhere and use it when I do get and post request as that user (let's say, as super admin so I can GET all the info including email address). But I have no idea how to get JWT token after login (can be email password login or Social login). "},"comment":{"url":"https://api.github.com/repos/Stamplay/stamplay-js-sdk/issues/comments/197185985","html_url":"https://github.com/Stamplay/stamplay-js-sdk/issues/24#issuecomment-197185985","issue_url":"https://api.github.com/repos/Stamplay/stamplay-js-sdk/issues/24","id":197185985,"user":{"login":"claudiopetrini","id":6942552,"avatar_url":"https://avatars.githubusercontent.com/u/6942552?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiopetrini","html_url":"https://github.com/claudiopetrini","followers_url":"https://api.github.com/users/claudiopetrini/followers","following_url":"https://api.github.com/users/claudiopetrini/following{/other_user}","gists_url":"https://api.github.com/users/claudiopetrini/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiopetrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiopetrini/subscriptions","organizations_url":"https://api.github.com/users/claudiopetrini/orgs","repos_url":"https://api.github.com/users/claudiopetrini/repos","events_url":"https://api.github.com/users/claudiopetrini/events{/privacy}","received_events_url":"https://api.github.com/users/claudiopetrini/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T07:00:04Z","updated_at":"2016-03-16T07:00:04Z","body":"@hughred22 are you sure that the snippet of code is the one you are showing us?\r\n\r\nThe error comes from a PUT request which is calling `/api/user/v1/users` instead of `/api/user/v1/users/:userId `. \r\n\r\nAs you can see the console is saying `The response had HTTP status code 404` so iit seems like in your \r\ncode you're calling `Stamplay.User.update(id, data, [callback] )` without an id.\r\n\r\n\r\n "}}