Meteor.loginWithGoogle() success or failure callback


I have a web app which i am logging in using google. Is there a way i can have a callback fired when a user is logged in with google successfully and another when a a user is not logged in successfully?.


This works for me

  requestPermissions: ['email']
}, function(error) {
  if (error) {
    console.log(error); //If there is any error, will get error here
    console.log(Meteor.user());// If there is successful login, you will get login details here