{"action":"created","issue":{"url":"https://api.github.com/repos/devfd/react-native-google-signin/issues/147","repository_url":"https://api.github.com/repos/devfd/react-native-google-signin","labels_url":"https://api.github.com/repos/devfd/react-native-google-signin/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/devfd/react-native-google-signin/issues/147/comments","events_url":"https://api.github.com/repos/devfd/react-native-google-signin/issues/147/events","html_url":"https://github.com/devfd/react-native-google-signin/issues/147","id":185524514,"number":147,"title":"[Android] accessToken not returned","user":{"login":"sortofbusy","id":604318,"avatar_url":"https://avatars.githubusercontent.com/u/604318?v=3","gravatar_id":"","url":"https://api.github.com/users/sortofbusy","html_url":"https://github.com/sortofbusy","followers_url":"https://api.github.com/users/sortofbusy/followers","following_url":"https://api.github.com/users/sortofbusy/following{/other_user}","gists_url":"https://api.github.com/users/sortofbusy/gists{/gist_id}","starred_url":"https://api.github.com/users/sortofbusy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sortofbusy/subscriptions","organizations_url":"https://api.github.com/users/sortofbusy/orgs","repos_url":"https://api.github.com/users/sortofbusy/repos","events_url":"https://api.github.com/users/sortofbusy/events{/privacy}","received_events_url":"https://api.github.com/users/sortofbusy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-26T22:13:13Z","updated_at":"2016-12-10T16:44:22Z","closed_at":null,"body":"I'm running into the issue of not getting an accessToken attached to the returned user object in Android using react-native: 0.35 and react-native-google-signin: 0.8.1\n\nAt https://github.com/devfd/react-native-google-signin/blob/v0.8.1/GoogleSignin.android.js#L77,\nthe access token is not being returned with the user object. I'm assuming the return value from RNGoogleSignInSilentSuccess is not mutable. If I do a JSON stringify/parse of `user`, the accessToken is passed properly as a property of `this._user`. Is there something I'm missing about how to get the accessToken in Android?\n\n``` javascript\n  currentUserAsync() {\n    return new Promise((resolve, reject) => {\n      const sucessCb = DeviceEventEmitter.addListener('RNGoogleSignInSilentSuccess', (user) => {\n        this._user = user;\n\n        RNGoogleSignin.getAccessToken(user).then((token) => {\n          this._user.accessToken = token;\n          console.log(this._user);                // will show no access token!\n          this._removeListeners(sucessCb, errorCb);\n          resolve(this._user);\n        })\n```\n"},"comment":{"url":"https://api.github.com/repos/devfd/react-native-google-signin/issues/comments/266221353","html_url":"https://github.com/devfd/react-native-google-signin/issues/147#issuecomment-266221353","issue_url":"https://api.github.com/repos/devfd/react-native-google-signin/issues/147","id":266221353,"user":{"login":"ujwal-setlur","id":5835869,"avatar_url":"https://avatars.githubusercontent.com/u/5835869?v=3","gravatar_id":"","url":"https://api.github.com/users/ujwal-setlur","html_url":"https://github.com/ujwal-setlur","followers_url":"https://api.github.com/users/ujwal-setlur/followers","following_url":"https://api.github.com/users/ujwal-setlur/following{/other_user}","gists_url":"https://api.github.com/users/ujwal-setlur/gists{/gist_id}","starred_url":"https://api.github.com/users/ujwal-setlur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ujwal-setlur/subscriptions","organizations_url":"https://api.github.com/users/ujwal-setlur/orgs","repos_url":"https://api.github.com/users/ujwal-setlur/repos","events_url":"https://api.github.com/users/ujwal-setlur/events{/privacy}","received_events_url":"https://api.github.com/users/ujwal-setlur/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T16:44:22Z","updated_at":"2016-12-10T16:44:22Z","body":"@centaurreader Did you get an actual valid access token? I tried this, and get a garbage value that does not look like a token at all\r\n\r\n{ _45: 0, _81: 0, _65: null, _54: null }\r\n\r\n"}}
{"actor":{"display_login":"ujwal-setlur"}}