How to get a Google+ profile using Meteor.loginWithGoogle?

I am looking for a working example Meteor.loginWithGoogle (with meteor 0.6.4.1).

I found this for loginWithGitHub ( https://www.eventedmind.com/posts/meteor-customizing-login ), which works fine with GitHub.

It works fine without parameters, as shown here on the client side:

Template.user_loggedout.events({ "click #login": function(e, tmpl){ Meteor.loginWithGoogle({ }, function (err) { if(err) { //error handling alert('error : '+err.message); } else { } }); } }); 

with Accounts parameters on the server side:

 Accounts.loginServiceConfiguration.remove({ service: 'google' }); Accounts.loginServiceConfiguration.insert({ service: 'google', clientId: 'XXXXXX', secret: 'YYYYYY' }); 

In this case, how can I get currentUser information, especially mail? Is there a way to get a user's Google+ profile (if he has one and allows it), for example, the user's avatar? What are the required parameters for requestPermissions: what can I get with this?

thanks

+3
source share

Source: https://habr.com/ru/post/953913/


All Articles