Meteor Accounts.ui.config无法与Google合作 [英] Meteor Accounts.ui.config not working with Google

查看:110
本文介绍了Meteor Accounts.ui.config无法与Google合作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am simply trying to log in with Google and get the permissions for Calendar, etc. However, my code in the client only prompts user signing in for offline access. Why is it not asking for the calendars, etc.? Also, it is not forcing the approval prompt. I'm using 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文档没有帮助,因为我收到此错误:

Following Meteor docs not helping, as I get this error:

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


推荐答案

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

The problem is the forceApprovalPrompt key which is not recognized by the package. If you remove the key, it will ask for the calendars, etc.

这似乎在使用accounts-ui软件包时起作用,所以显然这是由于缺少中的功能ian:accounts-ui-bootstrap-3

It seems to work when using the accounts-ui package instead, so apparently this is due to a missing feature in ian:accounts-ui-bootstrap-3.

这篇关于Meteor Accounts.ui.config无法与Google合作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆