Why does google plus login on Angularjs not work correctly?

Asked

Viewed 108 times

1

I have a mobile app and I have option to login by google plus I have the controller but when I log in and choose the account the information is not saved in session.set I did following this tuturial https://github.com/EddyVerbruggen/cordova-plugin-googleplus I already did step 1 to configure the android he generated a file I did with the keytool but I also don’t know where I put that file login or ask for permission.

Controller

.controller('LoginGoogle', function($http, $scope, sessionService, $ionicLoading) {
  // This method is executed when the user press the "Sign in with Google" button
  $scope.googleSignIn = function() {
    $ionicLoading.show({
      template: 'Aguarde...'
    });

    window.plugins.googleplus.login(
    {},
      function (user_data) {

        sessionService.set('user_id',user_data.userId);
        sessionService.set('nome',user_data.displayName);
        sessionService.set('user_foto',user_data.imageUrl);
        //sessionService.set('user_slug',userInfo.user_slug);

        $ionicLoading.hide();

        window.location = "#/app/home"
      },
      function (msg) {
        $ionicLoading.hide();
      }
    );
  };
})

File Generated and downloaded

google-services.json
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.