Meteor Accounts.ui.config not working with Google

二次信任 提交于 2019-12-29 07:01:30

问题


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: []
});

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

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

回答1:


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.

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.



来源:https://stackoverflow.com/questions/27468270/meteor-accounts-ui-config-not-working-with-google

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!