passport-facebook
passport-facebook copied to clipboard
Rerequest special permissions
Hello is there a way to pause the login process until the user has given the special permissions? I have this code that asks the user every time he logs in for the permissions but I want it to not let him continue until he accepts them
router.get('/auth/facebook', passport.authenticate('facebook', {
authType: 'rerequest',
scope: [
'email',
'read_insights'
]
}));
AuthType: rerequest doesn't seem to work
See this and specifically in the section "Re-asking for Declined Permissions"
This is because once someone has declined a permission, the Login Dialog will not re-ask them for it unless you explicitly tell the dialog you're re-asking for a declined permission.
You do this by adding the auth_type: rerequest flag to your FB.login() call:
app.get('/auth/facebook', passport.authenticate('facebook', { authType: 'rerequest', scope: ['user_friends', 'manage_pages'] }));
rerequest doesnt seem to be working.
Any other solution around this? I can manually redirect user to grant permission page again. But if there is a shortcut, then please let me know.
rerequest is not working. How do you redirect user to grant permission page again ?
2017-06 rerequest
is not working
{authType: 'reauthenticate'} Works for me 👍
@WeiChienHsu reauthenticate
is different from rerequest
:
-
rerequest
asks the user for permissions again -
reauthenticate
forces the user to enter their password again (see https://developers.facebook.com/docs/facebook-login/reauthentication)