I have a facebook app linked to my firebase project. I need the user's email but when I register via facebook, the user has the option to not give my app the email.
I have been reading documentation in facebook developers, specifically: https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/
I found the section where if user does not grant email permission the facebook popup can 're-prompt' and ask the user again to give the email-read permission.
The way firebase tell me to implement that behavior is via customParameters: https://firebase.google.com/docs/reference/js/firebase.auth.FacebookAuthProvider?hl=es#setcustomparameters
you can add the customParameters to the instance of the facebook provider, and i only set the auth_type: rerequest in that function:
provider.setCustomParameters({
auth_type: 'rerequest',
});
Then when I check the URL of the facebook login popup, the auth_type is correctly set to rerequest, however, the user can still denegate email permission and the login proceed.
What am I doing wrong? Why I can't re request the user for permissions?