Skip to content

Check mEmail for empty String to prevent "credential identifier cannot be empty" error #152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

stba42
Copy link

@stba42 stba42 commented May 28, 2016

made code more robust, should fix #141

made code more robust, should fix firebase#141
@@ -89,7 +89,7 @@ protected void onStart() {

@Override
public void onConnected(@Nullable Bundle bundle) {
if (mEmail == null) {
if (mEmail == null || mEmail.equals("")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be replaced with TextUtils.isEmpty(mEmail)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should investigate under what circumstances a null / empty email address ever arrives here. I agree with sam however that if (TextUtils.isEmpty(mEmail) is a more descriptive check here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty email issue happens due to privacy setting of some users, where you get name and profile image but email is null

@samtstern
Copy link
Contributor

@iainmcgin please review.

@SUPERCILEX
Copy link
Collaborator

SUPERCILEX commented Oct 17, 2016

This PR can be closed now: fixed in #357 (be7e0c3).

@SUPERCILEX SUPERCILEX mentioned this pull request Oct 23, 2016
10 tasks
@samtstern
Copy link
Contributor

#357 merged.

@samtstern samtstern closed this Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Facebook login error
5 participants