How to request additional oauth ranges in Meteor Accounts

I use Google accounts to authenticate users for the Google Drive app written in Meteor. I want to request the https://www.googleapis.com/auth/drive scope along with the user.email and user.profile scopes that are requested by default. I think this was done with requestPermissions, but I can't get it to work.

+4
source share
1 answer

When adding this code, the problem is fixed:

if (Meteor.isClient){
    var scopes = ['https://www.googleapis.com/auth/drive','https://www.googleapis.com/auth/userinfo.email']
    Accounts.ui.config({'requestPermissions':{'google':scopes}});
}
+3
source

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


All Articles