Meteor Accounts.ui.config 不适用于 Google [英] Meteor Accounts.ui.config not working with Google

查看:23
本文介绍了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天全站免登陆