feat(firebase_auth): v1 rework #3140
Merged
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.
Co-authored-by: @Ehesp
Co-authored-by: @greghesp
Co-authored-by: @helenaford
Co-authored-by: @kirstywilliams
Co-authored-by: @Salakar
NEW DOCUMENTATION.
Description
As part of our on-going work for #2582 this is our finalised Firebase Authentication rework changes.
Overall, Firebase Auth has been heavily reworked to bring it inline with the federated plugin setup along with adding new features, documentation and many more unit and end-to-end tests (tested on Web, Android, iOS & MacOS). The API has mainly been kept the same, however there are some breaking changes.
General
FirebaseUser
class has been renamed toUser
.AuthResult
class has been renamed toUserCredential
.ActionCodeSettings
class is now consumable on all supporting methods.dynamicLinkDomain
property.FirebaseAuthException
class (extendsFirebaseException
).FirebaseAuthException
, allowing you to access the code & message associated with the error.email
andcredential
properties on exceptions if they exist.FirebaseAuth
currentUser()
is now synchronous via thecurrentUser
getter.isSignInWithEmailLink()
is now synchronous.FirebaseAuth.fromApp()
is now deprecated in favor ofFirebaseAuth.instanceFor()
.onAuthStateChanged
has been deprecated in favor ofauthStateChanges()
.idTokenChanges()
stream listener.userChanges()
stream listener.updateProfile()
).applyActionCode()
.checkActionCode()
.verifyPasswordResetCode()
.languageCode
getter.setLanguageCode()
now supports providing anull
value.null
is provided the Firebase projects default language will be set.null
is provided the device language will be used.verifyPhoneNumber()
exposes aautoRetrievedSmsCodeForTesting
property.appVerificationDisabledForTesting
setting can now be set for iOS.userAccessGroup
setting can now be set for iOS & MacOS.User
UpdateUserInfo
class when usingupdateProfile
in favor of named arguments.getIdTokenResult()
.verifyBeforeUpdateEmail()
.nil
property values.UserCredential
AuthCredential
via thecredential
property.AuthProvider
&AuthCredential
GoogleAuthProvider
)getCredential()
methods have been deprecated in favor ofcredential()
.EmailAuthProvider.getCredentialWithLink()
has been deprecated in favor ofEmailAuthProvider.credentialWithLink()
.signInWithPopup()
orsignInWithRedirect()
.Related Issues & PRs
...and more (will be manually linked and closed following merge of this PR).
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?