{"action":"closed","issue":{"url":"https://api.github.com/repos/soundcloud/soundcloud-javascript/issues/19","labels_url":"https://api.github.com/repos/soundcloud/soundcloud-javascript/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/soundcloud/soundcloud-javascript/issues/19/comments","events_url":"https://api.github.com/repos/soundcloud/soundcloud-javascript/issues/19/events","html_url":"https://github.com/soundcloud/soundcloud-javascript/issues/19","id":89515941,"number":19,"title":"After login, SC.accessToken() sometimes returns null ","user":{"login":"JWGmeligMeyling","id":3469492,"avatar_url":"https://avatars.githubusercontent.com/u/3469492?v=3","gravatar_id":"","url":"https://api.github.com/users/JWGmeligMeyling","html_url":"https://github.com/JWGmeligMeyling","followers_url":"https://api.github.com/users/JWGmeligMeyling/followers","following_url":"https://api.github.com/users/JWGmeligMeyling/following{/other_user}","gists_url":"https://api.github.com/users/JWGmeligMeyling/gists{/gist_id}","starred_url":"https://api.github.com/users/JWGmeligMeyling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JWGmeligMeyling/subscriptions","organizations_url":"https://api.github.com/users/JWGmeligMeyling/orgs","repos_url":"https://api.github.com/users/JWGmeligMeyling/repos","events_url":"https://api.github.com/users/JWGmeligMeyling/events{/privacy}","received_events_url":"https://api.github.com/users/JWGmeligMeyling/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-19T09:26:54Z","updated_at":"2015-09-24T13:16:53Z","closed_at":"2015-09-24T13:16:53Z","body":"After login, SC.accessToken() sometimes still returns null .\r\n\r\nSoundCloud API usage in https://github.com/MoodCat/MoodCat.me-Frontend/blob/master/app/scripts/services/audio/soundCloudService.js : \r\n```js\r\n      SC.initialize({\r\n        client_id: soundCloudKey,\r\n        redirect_uri: window.location.origin,\r\n        access_token: $cookieStore.get('scAuth'),\r\n        scope: 'non-expiring'\r\n      });\r\n\r\n      this.loginUsingSoundcloud = function loginUsingSoundcloud() {\r\n        var deferred = $q.defer();\r\n\r\n        SC.connect(function() {\r\n          deferred.resolve();\r\n          var accessToken = SC.accessToken();\r\n          $cookieStore.put('scAuth', accessToken);\r\n          $rootScope.loggedIn = true;\r\n          $rootScope.$broadcast('soundcloud-login');\r\n        });\r\n\r\n        return deferred.promise;\r\n      };\r\n\r\n```"}}