Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
292 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...