{"action":"created","issue":{"url":"https://api.github.com/repos/lelylan/simple-oauth2/issues/68","repository_url":"https://api.github.com/repos/lelylan/simple-oauth2","labels_url":"https://api.github.com/repos/lelylan/simple-oauth2/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/lelylan/simple-oauth2/issues/68/comments","events_url":"https://api.github.com/repos/lelylan/simple-oauth2/issues/68/events","html_url":"https://github.com/lelylan/simple-oauth2/issues/68","id":136129866,"number":68,"title":"Since 0.3.0, refreshToken( err, result ) gives `global` back as result","user":{"login":"WeeJeWel","id":319873,"avatar_url":"https://avatars.githubusercontent.com/u/319873?v=3","gravatar_id":"","url":"https://api.github.com/users/WeeJeWel","html_url":"https://github.com/WeeJeWel","followers_url":"https://api.github.com/users/WeeJeWel/followers","following_url":"https://api.github.com/users/WeeJeWel/following{/other_user}","gists_url":"https://api.github.com/users/WeeJeWel/gists{/gist_id}","starred_url":"https://api.github.com/users/WeeJeWel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeeJeWel/subscriptions","organizations_url":"https://api.github.com/users/WeeJeWel/orgs","repos_url":"https://api.github.com/users/WeeJeWel/repos","events_url":"https://api.github.com/users/WeeJeWel/events{/privacy}","received_events_url":"https://api.github.com/users/WeeJeWel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-24T17:29:27Z","updated_at":"2016-03-05T05:17:26Z","closed_at":null,"body":"A pretty odd issue that I've traced back to 0.3.0. In 0.2.1, it's working.\r\n\r\nReproduce:\r\n\r\n```\r\n// Get the access token object.\r\n// Initialize the OAuth2 Library\r\nvar oauth2 = require('simple-oauth2')(credentials);\r\nvar token;\r\nvar tokenConfig = {};\r\n\r\n// Get the access token object for the client\r\noauth2.client.getToken(tokenConfig, function saveToken(err, result) {\r\n\tif (err) console.error(err);\r\n\ttoken = oauth2.accessToken.create(result);\r\n\tconsole.log('got token', token)\r\n\ttoken.refresh(function(err, result) {\r\n\t\t// result here is the same as `global`, with an added `token` property, which contains the new token\r\n\t\tconsole.log('refreshed token', err, result)\r\n\t})\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/lelylan/simple-oauth2/issues/comments/192577579","html_url":"https://github.com/lelylan/simple-oauth2/issues/68#issuecomment-192577579","issue_url":"https://api.github.com/repos/lelylan/simple-oauth2/issues/68","id":192577579,"user":{"login":"roymap","id":201791,"avatar_url":"https://avatars.githubusercontent.com/u/201791?v=3","gravatar_id":"","url":"https://api.github.com/users/roymap","html_url":"https://github.com/roymap","followers_url":"https://api.github.com/users/roymap/followers","following_url":"https://api.github.com/users/roymap/following{/other_user}","gists_url":"https://api.github.com/users/roymap/gists{/gist_id}","starred_url":"https://api.github.com/users/roymap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roymap/subscriptions","organizations_url":"https://api.github.com/users/roymap/orgs","repos_url":"https://api.github.com/users/roymap/repos","events_url":"https://api.github.com/users/roymap/events{/privacy}","received_events_url":"https://api.github.com/users/roymap/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T05:17:26Z","updated_at":"2016-03-05T05:17:26Z","body":"I see that too.  The result contains a token object instead of being that token object."}}