Skip to content

Rank providers by usability when picking top provider #1362

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 6 commits into from
Aug 28, 2018
Merged

Rank providers by usability when picking top provider #1362

merged 6 commits into from
Aug 28, 2018

Conversation

SUPERCILEX
Copy link
Collaborator

As a side effect, this fixes the bug where linking is broken if the developer removes support for a provider.

As a side effect, this fixes the bug where linking is broken if the developer removes support for a
provider.

Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX SUPERCILEX requested a review from samtstern as a code owner June 19, 2018 22:20
@samtstern
Copy link
Contributor

@SUPERCILEX do you think developers expect what they passed in to to be a priority? In my opinion it's just a UI concern, devs may be choosing this order based on color combinations / other aesthetic concerns.

Also is it safe (with linking and stuff) to change this ordering now?

@SUPERCILEX
Copy link
Collaborator Author

@samtstern Huh, I hadn't thought of it that way. Basically, my gripe is that if I'm already linked to Google and then add Facebook, we're always going to try and use Facebook—even if I sign in later with Google again. And we all know that no sign-in method can compete with Google's simplicity. That's why we stopped showing the others before the picker screen.

I'd be happy to just force Google to be on top, but I feel like we had decided against that for some reason. What do you think?

@samtstern
Copy link
Contributor

@SUPERCILEX I do see what you're saying but I think we want a way to solve this that's not tied to the order things are presented in the UI ... let's punt to 4.2.0 and think about it more.

@samtstern samtstern added this to the 4.2.0 milestone Jun 26, 2018
@SUPERCILEX
Copy link
Collaborator Author

SGTM!

…er-priority

# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/util/data/ProviderUtils.java
#	auth/src/main/java/com/firebase/ui/auth/viewmodel/email/EmailProviderResponseHandler.java
#	auth/src/main/java/com/firebase/ui/auth/viewmodel/idp/SocialProviderResponseHandler.java
#	auth/src/test/java/com/firebase/ui/auth/AuthUITest.java
Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX SUPERCILEX changed the base branch from version-4.1.0-dev to version-4.2.0-dev August 14, 2018 21:05
@SUPERCILEX
Copy link
Collaborator Author

@samtstern Alrighty, I redid this PR so it has these changes now:

  • Fixes the bug where a provider that's no longer allowed is still returned.
  • If the Google provider is present, make it the priority. I think this is fair not only because Firebase is a Google product, but also because Google sign-in is objectively a way better experience for the user than any other provider.

WDYT?

Signed-off-by: Alex Saveau <[email protected]>
@ArtbyRere
Copy link

Great

@SUPERCILEX
Copy link
Collaborator Author

@samtstern WDYT?

Copy link
Contributor

@samtstern samtstern left a comment

Choose a reason for hiding this comment

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

If the Google provider is present, make it the priority. I think this is fair not only because Firebase is a Google product, but also because Google sign-in is objectively a way better experience for the user than any other provider.

I would prefer to remove this and not be as opinionated. I know that the Firebase backend already prefers Google in some cases but in my experience developers don't really like that! Let's just allow the providers to go through in order, wdyt?

}
}

if (lastSignedInProviders.contains(GoogleAuthProvider.PROVIDER_ID)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment here explaining what you're doing (making sure Google is always first) and why?

startWelcomeBackFlowForLinking(
ProviderUtils.getTopProvider(providers),
response);
if (providers.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: instead of else { if {} else {} } how about else if { } else { }?

@samtstern
Copy link
Contributor

(also apologies for being so slow to get to this! I like the rewrite though)

Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX SUPERCILEX changed the title Use developer configured provider priority when picking top provider Rank providers by usability when picking top provider Aug 28, 2018
@SUPERCILEX
Copy link
Collaborator Author

@samtstern The reasoning behind this change is that the Google provider is simply a better experience for the user (less clicks). Devs complain about other providers being removed in favor of Google (which isn't great), but this is only a user-facing change. All this does is make it so users get the 1-click experience when signing back in (and doesn't change the sign-up experience). Is that reasonable?

@ArtbyRere
Copy link

Great idea

@samtstern
Copy link
Contributor

@SUPERCILEX ok I am convinced, your judgement on these things is almost always good. LGTM.

@samtstern samtstern merged commit 0da111b into firebase:version-4.2.0-dev Aug 28, 2018
@SUPERCILEX SUPERCILEX deleted the provider-priority branch August 28, 2018 20:15
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.

3 participants