【问题标题】:Meteor Accounts.ui.config not working with GoogleMeteor Accounts.ui.config 不适用于 Google
【发布时间】:2014-12-14 10:11:02
【问题描述】:

我只是尝试使用 Google 登录并获取日历等权限。但是,我在客户端中的代码仅提示用户登录以进行离线访问。为什么它不要求日历等?此外,它不会强制批准提示。我正在使用 ian:accounts-ui-bootstrap-3

Accounts.ui.config({
    requestPermissions: {
        google: 
        ['https://www.googleapis.com/auth/calendar',
        'https://www.googleapis.com/auth/calendar.readonly',
        'https://www.googleapis.com/auth/userinfo.profile',
        'https://www.googleapis.com/auth/userinfo.email',
        'https://www.googleapis.com/auth/tasks'],
//      forceApprovalPrompt: {google: true}
    }, 
    forceApprovalPrompt: {google: true},
    requestOfflineToken: {google: true},
    passwordSignupFields: 'EMAIL_ONLY',
//      extraSignupFields: []
});

以下 Meteor 文档无济于事,因为我收到此错误:

Uncaught Error: Accounts.ui.config: Invalid key: forceApprovalPrompt

【问题讨论】:

    标签: javascript meteor twitter-bootstrap-3 google-signin


    【解决方案1】:

    问题是包无法识别的forceApprovalPrompt 键。如果您删除密钥,它会要求提供日历等。

    在使用 accounts-ui 包时它似乎可以工作,所以显然这是由于 ian:accounts-ui-bootstrap-3 中缺少功能。

    【讨论】:

    猜你喜欢
    • 2016-01-02
    • 2016-07-16
    • 2016-04-20
    • 1970-01-01
    • 2016-07-19
    • 1970-01-01
    • 2014-04-18
    • 2017-05-12
    • 2014-10-28
    相关资源
    最近更新 更多