This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[firebase_auth] Update auth methods to return AuthResult instead of FirebaseUser#1911
Merged
collinjackson merged 8 commits intoflutter:masterfrom Jul 28, 2019
Merged
Conversation
AuthResult instead of FirebaseUser.
11 tasks
kroikie
approved these changes
Jul 26, 2019
Contributor
kroikie
left a comment
There was a problem hiding this comment.
LGTM, with small readability nit.
| FirebaseUser user = await auth.currentUser(); | ||
| user = await user.linkWithCredential(credential); | ||
| AuthResult result = await user.linkWithCredential(credential); | ||
| user = result.user; |
Contributor
There was a problem hiding this comment.
In some cases the user is extracted in one statement and in other cases it is extracted in two statements. Maybe it would be more readable to keep it consistent.
Contributor
Author
There was a problem hiding this comment.
Good call. I've updated the tests. In the process I wrote some more tests of the new code I added and fixed some issues (I had missed reauthenticate on my first pass, and the getter for profile lacked an appropriate cast)
13 tasks
…ests and add missing cast
mithun-mondal
pushed a commit
to bKash-developer/archived_plugins
that referenced
this pull request
Aug 6, 2019
…irebaseUser (flutter#1911) * Sign-in methods now return `AuthResult` instead of `FirebaseUser`. * Change `reauthenticateWithCredential` to return AuthResult as well * Update tests
julianscheel
pushed a commit
to jusst-engineering/plugins
that referenced
this pull request
Mar 11, 2020
…irebaseUser (flutter#1911) * Sign-in methods now return `AuthResult` instead of `FirebaseUser`. * Change `reauthenticateWithCredential` to return AuthResult as well * Update tests
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
This change adds new
AuthResultandAdditionalUserInfoclasses, bringing the API in line with how things work on Android. We don't expose thecredentialon theAuthResultclass (yet).This is a Breaking Change because sign-in methods now return
AuthResultinstead ofFirebaseUser. Pretty much every user of this plugin will have to update their code. We're getting this out of the way prior to 1.0.Related Issues
This change should be landed instead of #1614
Another breaking change that should land at the same time: #1871
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?