Skip to content

Fix smart lock email flow #416

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

Merged
merged 1 commit into from
Nov 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,19 @@ public void onComplete(@NonNull Task<Status> task) {
}

private void redirectToIdpSignIn(String email, String accountType) {
if (accountType != null && (accountType.equals(IdentityProviders.GOOGLE)
if (TextUtils.isEmpty(accountType)) {
startActivityForResult(
SignInNoPasswordActivity.createIntent(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should I directly start the register email activity or leave it at this?

Copy link
Contributor

Choose a reason for hiding this comment

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

So we actually can't go straight to RegisterEmailActivity since we're not sure at this point if it's a new or existing account. I think this is safest.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's what I was thinking, play it safe.

getContext(),
mHelper.getFlowParams(),
email),
RC_EMAIL_FLOW);
return;
}

if (accountType.equals(IdentityProviders.GOOGLE)
|| accountType.equals(IdentityProviders.FACEBOOK)
|| accountType.equals(IdentityProviders.TWITTER))) {
|| accountType.equals(IdentityProviders.TWITTER)) {
IdpSignInContainer.signIn(
getActivity(),
mHelper.getFlowParams(),
Expand Down