如何在Meteor帐户中请求额外的oauth作用域

如何在Meteor帐户中请求额外的oauth作用域,oauth,meteor,oauth-2.0,google-drive-api,Oauth,Meteor,Oauth 2.0,Google Drive Api,我正在使用google帐户验证用Meteor编写的google Drive应用程序的用户。我想请求默认情况下请求的user.email和user.profile范围以及作用域。我想我已经看到了使用“requestPermissions”完成此操作,但我无法让它工作。添加此代码修复了问题: if (Meteor.isClient){ var scopes = ['https://www.googleapis.com/auth/drive','https://www.googleapis.c

我正在使用google帐户验证用Meteor编写的google Drive应用程序的用户。我想请求默认情况下请求的user.email和user.profile范围以及作用域。我想我已经看到了使用“requestPermissions”完成此操作,但我无法让它工作。

添加此代码修复了问题:

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

谢谢你,节省了我很多时间。:)