Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@SUPERCILEX
Copy link
Collaborator

Built on top of #1213

Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX SUPERCILEX requested a review from samtstern as a code owner March 26, 2018 00:17
@samtstern samtstern added this to the 3.3.1 milestone Mar 27, 2018
@SUPERCILEX SUPERCILEX changed the base branch from version-3.3.0-dev to master March 28, 2018 21:49
@samtstern samtstern changed the base branch from master to version-3.3.1-dev March 29, 2018 15:28
// Email address is malformed
mEmailInput.setError(getString(R.string.fui_invalid_email_address));
} else if (e instanceof FirebaseAuthUserCollisionException) {
// Collision with existing user email, it should be very hard for
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we changing our assumption from "very hard to get here" to "impossible to get here"? Fine with me, just confirming.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh nevermind, I see the StartWelcomeBackFlow in the ViewModel

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup, moved that logic there.

private void validateAndSignIn(String password) {
// Check for null or empty password
if (TextUtils.isEmpty(password)) {
mPasswordLayout.setError(getString(R.string.fui_required_field));
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we return if the password is empty?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We do, it looks like the diff hides it 😉

// Collision with existing user email, it should be very hard for
// the user to even get to this error due to CheckEmailFragment.
ProviderUtils.fetchTopProvider(getAuth(), email)
.addOnSuccessListener(new StartWelcomeBackFlow(email));
Copy link
Contributor

Choose a reason for hiding this comment

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

What about when this call fails too? Feels like we could get a case where the Resource never gets to a final state.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Whoops, yeah.

@SUPERCILEX SUPERCILEX changed the title Remove unused email strings Rewrite email logic with new architecture Apr 2, 2018
@samtstern samtstern merged commit 9d954e4 into firebase:version-3.3.1-dev Apr 2, 2018
@SUPERCILEX SUPERCILEX deleted the unused branch April 2, 2018 17:24
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.

2 participants