I'm working on a Node.js application that uses Passport.js for authenticating with Google Plus. In a later stage now, we have introduced of adding activities using Google+'s moment.insert to the user's Google+ feed when they leave reviews at our site. Posting using moment.insert
needs a special permission called requestvisibleactions
. The passport.js documentation doesn't say how I can ask for such permissions while logging in.
My current auth handler setup is like this:
app.get('/auth/google', redirect, passport.authenticate('google', {
scope: ['https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/plus.me', 'https://www.googleapis.com/auth/plus.moments.write'],
accessType: 'offline'
}));
Any pointers on how I can specify the requestvisibleactions
permission mentioned in this page during passport.js authentication is appreciated.