angular-googleapi
angular-googleapi copied to clipboard
Its not showing the list of already logged-in accounts while login.
I have two issue on the same:
- Whenever I clicked in login button it opened a popup and close it after some time(2-3 sec. approx), but I have already logged-in with 3 different google account but its not giving me options to choose in which account I want to login.
- I don't want user google plus detail after logged in, I just want
accessTokenas a response after login success.
Can you please add this features or give me some other links or resources which can fulfill my requirements.
$scope.authenticated = false;
$scope.calendarsLoaded = false;
function checkAuth() {
setTimeout(function () {
gapi.auth === undefined ? checkAuth() : googleLogin.checkAuth();
}, 20);
}
// check if the user is logged in when the page loads
checkAuth();
// have a login button call this
$scope.login = function () {
googleLogin.login();
};
$scope.loadCalendars = function () {
googleCalendar.listCalendars().then(function (calendars) {
$scope.calendarsLoaded = true;
$scope.calendars = calendars;
});
};