{"action":"created","issue":{"url":"https://api.github.com/repos/thomseddon/node-oauth2-server/issues/107","labels_url":"https://api.github.com/repos/thomseddon/node-oauth2-server/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/thomseddon/node-oauth2-server/issues/107/comments","events_url":"https://api.github.com/repos/thomseddon/node-oauth2-server/issues/107/events","html_url":"https://github.com/thomseddon/node-oauth2-server/pull/107","id":43678901,"number":107,"title":"Modifying refreshToken this.user to not broke the api","user":{"login":"tehmoon","id":2032550,"avatar_url":"https://avatars.githubusercontent.com/u/2032550?v=3","gravatar_id":"","url":"https://api.github.com/users/tehmoon","html_url":"https://github.com/tehmoon","followers_url":"https://api.github.com/users/tehmoon/followers","following_url":"https://api.github.com/users/tehmoon/following{/other_user}","gists_url":"https://api.github.com/users/tehmoon/gists{/gist_id}","starred_url":"https://api.github.com/users/tehmoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tehmoon/subscriptions","organizations_url":"https://api.github.com/users/tehmoon/orgs","repos_url":"https://api.github.com/users/tehmoon/repos","events_url":"https://api.github.com/users/tehmoon/events{/privacy}","received_events_url":"https://api.github.com/users/tehmoon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-09-23T20:22:51Z","updated_at":"2015-01-26T21:37:19Z","closed_at":"2015-01-26T21:37:19Z","pull_request":{"url":"https://api.github.com/repos/thomseddon/node-oauth2-server/pulls/107","html_url":"https://github.com/thomseddon/node-oauth2-server/pull/107","diff_url":"https://github.com/thomseddon/node-oauth2-server/pull/107.diff","patch_url":"https://github.com/thomseddon/node-oauth2-server/pull/107.patch"},"body":"Modifying the object because it adds a {id: } before the user object, {id: } that is not added in saveAccessToken by default and it brokes the API"},"comment":{"url":"https://api.github.com/repos/thomseddon/node-oauth2-server/issues/comments/71543450","html_url":"https://github.com/thomseddon/node-oauth2-server/pull/107#issuecomment-71543450","issue_url":"https://api.github.com/repos/thomseddon/node-oauth2-server/issues/107","id":71543450,"user":{"login":"thomseddon","id":747138,"avatar_url":"https://avatars.githubusercontent.com/u/747138?v=3","gravatar_id":"","url":"https://api.github.com/users/thomseddon","html_url":"https://github.com/thomseddon","followers_url":"https://api.github.com/users/thomseddon/followers","following_url":"https://api.github.com/users/thomseddon/following{/other_user}","gists_url":"https://api.github.com/users/thomseddon/gists{/gist_id}","starred_url":"https://api.github.com/users/thomseddon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomseddon/subscriptions","organizations_url":"https://api.github.com/users/thomseddon/orgs","repos_url":"https://api.github.com/users/thomseddon/repos","events_url":"https://api.github.com/users/thomseddon/events{/privacy}","received_events_url":"https://api.github.com/users/thomseddon/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T21:37:19Z","updated_at":"2015-01-26T21:37:19Z","body":"I think this is because the data you're returning an object in `refreshToken.userId`, as per the docs, you should either return a user object or a string: https://github.com/thomseddon/node-oauth2-server#getrefreshtoken-refreshtoken-callback\r\n\r\nClosing for now, please reopen if you have a failing test case"}}