Skip to content

If facebook email permission is not granted, no error handling occurs #352

@Alex100

Description

@Alex100

If a user does not grant the permission for the email address:

image

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions