If facebook email permission is not granted, no error handling occurs
See original GitHub issueIf a user does not grant the permission for the email address:
There is neither an error handling in FacebookProvider.java
(the caught JSONException
only closes the loading dialog):
GraphRequest request = GraphRequest.newMeRequest(
loginResult.getAccessToken(),
new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject object, GraphResponse response) {
try {
String email = object.getString("email");
mCallbackObject.onSuccess(createIDPResponse(loginResult, email));
} catch (JSONException e) {
e.printStackTrace();
mCallbackObject.onFailure(new Bundle());
}
}
});
nor an error handling in AuthMethodPickerActivity.java
@Override
public void onFailure(Bundle extra) {
// stay on this screen
mActivityHelper.dismissDialog();
}
According to the facebook permission handling guidlines https://developers.facebook.com/docs/facebook-login/handling-declined-permissions#reprompt a reprompt should be shown. This reprompt should explain why the email permission is needed
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Handle Declined Permissions - Facebook Login
People may decline a permission because they don't understand why your app needs that information. In this case, your app could display a...
Read more >How to Fix Auth Errors? (Facebook Permissions Error #200)
This error usually means that the ContentStudio web app has not been granted full permission to publish to your Facebook Group or Page....
Read more >Login not working if email address is not confirmed on Facebook
If the user denies permission to the email address, login to Drupal fails (as expected) with a message Facebook login failed. This site...
Read more >Response Codes and Errors - SAP Help Portal
errorCode errorMessage Description
0 Success.
200001 Operation canceled User canceled during the login process.
200009 Accounts linked The accounts have been linked successfully.
Read more >Facebook Integration Error Codes and Troubleshooting Guide
The constituents of the email should contain key error information such as "Error Code", "Error SubCode", "Error Message", "Facebook Page Name".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t understand the handling of this issue for Facebook. Right now the user is able to elect to not share their email address. Whether they do this or Facebook fails to return an email address anyway (because it is unverified, etc.) the user is dropped back to the Provider picker screen without being told anything failed.
As developers we have no ability to fix this at this point as we are still in the FirebaseUI activity. When the user confusedly backs out to the main activity all we can can inform them that they are still not logged in with no explanation.
In particular it is inconsistent with the way you handle emails for Twitter. On Twitter the user can also elect to keep their email private. In this case FirebaseUI works fine and registers them to the Firebase user list with a blank email address.
Here is my error using the last version of FirebaseUI
The problem was related to this issue: http://stackoverflow.com/questions/16630972/facebook-graph-api-wont-return-email-address After updating my primary email on Facebook the problem is gone