-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add support for Firebase backed silent sign-in #1212
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
samtstern
merged 17 commits into
firebase:version-3.4.0-dev
from
SUPERCILEX:silent-sign-in
Apr 17, 2018
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
706d539
Add support for Firebase backed silent sign-in
SUPERCILEX a3fbdd8
Add documentation
SUPERCILEX ff2814d
Cleanup
SUPERCILEX fbd3c9e
Merge remote-tracking branch 'upstream/version-3.3.0-dev' into silent…
SUPERCILEX 29c0944
Fix merge mistakes
SUPERCILEX cb25def
Merge remote-tracking branch 'upstream/master' into silent-sign-in
SUPERCILEX 0dd5ea5
Improve silent sign-in API
SUPERCILEX aa8e43b
Merge remote-tracking branch 'upstream/version-3.3.1-dev' into silent…
SUPERCILEX 623bee5
Add more docs and cleanup
SUPERCILEX 0393a69
Tidy docs
SUPERCILEX bcb873b
Fix possible memory leak
SUPERCILEX 11f49ac
Add clarifying comment
SUPERCILEX 23fc78a
Remove pointless checks
SUPERCILEX 9216282
Merge remote-tracking branch 'upstream/version-3.3.1-dev' into silent…
SUPERCILEX b1c958b
Merge remote-tracking branch 'upstream/version-3.4.0-dev' into silent…
SUPERCILEX a0794ab
Address review feedback
SUPERCILEX a234df1
More feedback
SUPERCILEX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am somewhat uncomfortable with all this code and chained async operations happening in one huge method block in
AuthUI. Should we consider making this happen inside a ViewModel inKickoffActivityor something so that it's rotation-immune? Obviously then we couldn't directly return aTaskbut I thinkonActivityResultwould be appropriate (and more consistent with our general mechanism anyway)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't like the number of chained tasks we have either, but I strongly disagree about the
onActivityResultandViewModelstuff. The point of this method is that it doesn't have any UI and should be done in the background (so it's up to the dev to deal with async callbacks as usual). As for rotation problems, they're up to the dev just like with any otherTask. Also, I tried calling the method multiple times myself and it doesn't seem to matter besides being signed-in several times with the same credentials on the Firebase side (so the method is deterministic in that you'll just get the same result multiple times).Do you see where I'm coming from? I literally call this method in my
Application#onCreate()and I think other people will want to do something similar.