Skip to content

Offline Auth method picker #1586

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 2 commits into from
Feb 25, 2019
Merged

Offline Auth method picker #1586

merged 2 commits into from
Feb 25, 2019

Conversation

samtstern
Copy link
Contributor

See #1585

Change-Id: Ida9cf56222798bffeccbd185b4afe77bfda26f3d
@samtstern
Copy link
Contributor Author

The idea here is to allow launching the auth method picker while offline in many cases. If your app uses FirebaseUI as the "home" screen for new users this can be essential.

@samtstern samtstern requested a review from SUPERCILEX February 22, 2019 18:10
@samtstern
Copy link
Contributor Author

@SUPERCILEX curious if you see any reasons to check for offline before showing the picker screen other than SmartLock?

@SUPERCILEX
Copy link
Collaborator

I'm actually curious, what happens if we don't do the check at all? getActiveNetworkInfo() is kind of a hack anyway since it will say you're connected even if the WiFi is behind a paywall or something like that (think Gogo Inflight).

It'll probably be hard to do, but I almost feel like each network request failure should be handled separately. We could map all the separate exceptions to a FUI network exception, similar to the user cancellation one. Then, we only fail when we truly couldn't connect to the network. It'll also improve the UX if a user was connected before the Smart Lock screen but then lost their internet juices.

In any case, I'm a fan of letting the user access the picker screen without an internet connection. 👍

Change-Id: I37628cc202065221dab9626aa642871f9d527703
@samtstern
Copy link
Contributor Author

@SUPERCILEX good call, removing the offline check produces the same behavior (at the start of the flow).

Later in the flow some things go badly if we're offline:

  • Email flow just basically does nothing.
  • Google sign in flow hangs forever

We should handle all of this, as you said, but for now I just want to keep this change small and straighforward.

@samtstern samtstern requested a review from lsirac February 25, 2019 18:04
Copy link
Collaborator

@SUPERCILEX SUPERCILEX left a comment

Choose a reason for hiding this comment

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

SGTM 👍

@samtstern samtstern merged commit cd26654 into version-4.3.2-dev Feb 25, 2019
@samtstern samtstern added this to the 4.3.2 milestone Feb 25, 2019
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