Skip to content

Instantly share code, notes, and snippets.

@simonmorley
Created January 25, 2015 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonmorley/000d391710fb7ea40977 to your computer and use it in GitHub Desktop.
Save simonmorley/000d391710fb7ea40977 to your computer and use it in GitHub Desktop.
Medium, creating a google+ splash page, accessToken helper adjustment
var formatAuthResponse = function() {
if ($scope.authResponse.member_id !== undefined) {
auth.accessToken = $scope.authResponse.access_token;
auth.memberId = $scope.memberId;
} else if ($scope.authResponse.userID !== undefined) {
auth.accessToken = $scope.authResponse.accessToken;
auth.userID = $scope.authResponse.userID;
auth.expires = $scope.authResponse.expires;
} else if ($scope.authResponse.client_id !== undefined) {
auth.accessToken = $scope.authResponse.access_token;
auth.clientID = $scope.authResponse.client_id;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment