Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $window.auth2.grantOfflineAccess({redirect_uri: 'postmessage', prompt: 'select_account'}).then(handleAuth2Result);
- function handleAuth2Result(response) {
- LoginService.googleUserAuth(response).then(startSession);
- }
- function startSession(userInfo) {
- AccountService.getProfile().then(userProfileLoaded);
- function userProfileLoaded(user_profile) {
- AccountService.getProfile().then(routeUser);
- }
- }
- function routeUser(){
- $state.go(INITIAL_ROUTE.route);
- }
Advertisement
Add Comment
Please, Sign In to add comment