firebase_auth_mocks 0.13.0 copy "firebase_auth_mocks: ^0.13.0" to clipboard
firebase_auth_mocks: ^0.13.0 copied to clipboard

Fakes for Firebase Auth. Use this package with `google_sign_in_mocks` to write unit tests involving Firebase Authentication.

0.13.0 #

Upgraded uuid to ^4.1.0 and firebase_auth_platform_interface to ^7.0.0. Thank you Rexios80!

0.12.0 #

0.11.0 #

  • BREAKING CHANGE: Replaced the MockUser.exception pattern by whenCalling(...).on(...).thenThrow(...) (PR-95).
  • FirebaseAuth.createUserWithEmailAndPassword returns ProviderData. Thank you robyf!
  • Implemented User.updatePhotoURL. Thank you bifrostyyy!
  • Implemented User.linkWithProvider, and User.unlink. Thank you bifrostyyy!
  • Make User.reload throw exceptions on demand (9ad29f0).

0.10.3 #

Fixed a bug where MockUserCredential.user would create a new MockUser at every call, in the anonymous case.

0.10.2+1 #

Make authForFakeFirestore send an event at the same time as the other two streams to fix race condition when Fake Cloud Firestore gets the latest user to check security rules.

0.10.2 #

Implemented authForFakeFirestore for Fake Cloud Firestore's security rules.

0.10.1 #

User.getIdTokenResult will return customClaims if idTokenResult is not explicitly set.

0.10.0 #

BREAKING CHANGE. Use the whenCalling(...).on(...).thenThrow(...) pattern instead of AuthExceptions (PR-87).

Instead of setting up your exception like this:

final auth = MockFirebaseAuth(
  authExceptions: AuthExceptions(
    signInWithCredential: FirebaseAuthException(code: 'something'),
  ),
);

Use:

whenCalling(Invocation.method(#signInWithCredential, null))
  .on(auth)
  .thenThrow(FirebaseAuthException(code: 'bla'));

You can also be more specific on when to throw the exception. See the README and https://pub.dev/packages/mock_exceptions.

0.9.3 #

  • Implemented FirebaseAuth.signInWithPopup and FirebaseAuth.signInWithProvider. Thanks ga-bri-el!

0.9.2 #

  • Fixed a crash when testing in signed in mode for an anonymous user. Thanks BenVercammen!
  • Fixed User.displayName so that it returns null by default. Thanks BenVercammen!

0.9.1 #

  • Implemented FirebaseAuth.fetchSignInMethodsForEmail. Thanks BenVercammen!
  • Implemented User.linkWithCredential. Thanks BenVercammen!
  • Support setting a customClaim for User.getIdToken. Thanks kody-liou!

0.9.0 #

  • Updated dependency to firebase_auth ^4.0.0.

0.8.7 #

  • Implemented proper generation of the auth_time, exp and iat values in User.getIdToken. Thanks kody-liou!
  • Implemented User.getIdTokenResult. Thank you BenGMiles!
  • Fixed User.email so that it returns null by default. Thank you defuncart!

0.8.6 #

  • Implemented generation of proper JWT token in User.getIdToken. Thanks kody-liou!
  • Implemented sendSignInLinkToEmail, confirmPasswordReset and verifyPasswordResetCode in FirebaseAuth. Thanks Zohenn!

0.8.5+1 #

  • Added missing changelogs.

0.8.5 #

  • Changed FirebaseAuth.verifyPhoneNumber's signature to include firebase_auth 3.5.0's new multi factor params. Thanks cedvdb and cselti!
  • Implemented FirebaseAuth.sendPasswordResetEmail. Thanks Zohenn!
  • Implemented User.sendEmailVerification. Thanks dipeshdulal!

0.8.4 #

  • Support throwing exceptions in FirebaseAuth's signInWithCredential, signInWithEmailAndPassword, createUserWithEmailAndPassword, signInWithCustomToken, signInAnonymously, and fetchSignInMethodsForEmail. Thanks defuncart!
  • Implemented FirebaseAuth.verifyPhoneNumber so that it resolves codeSent. Thanks cedvdb!

0.8.3 #

  • Implemented User methods reauthenticateWithCredential, updatePassword and delete with the ability to throw exceptions. Thanks defuncart!
  • Implemented createUserWithEmailAndPassword. Thanks f-hoedl!

0.8.2 #

  • Made userChanges and authStateChanges fire null on startup when signed out.
  • Turned userChanges and authStateChanges into broadcast streams so they can be listened to more than once.
  • Added providerData in MockUser. Thanks kornperkus!

0.8.1 #

  • Implemented FirebaseAuth.userChanges. Thanks mazzonem!
  • Implemented User.updateDisplayName. Thanks oudehomar!
  • Implemented FirebaseAuth.fetchSignInMethodsForEmail. Thanks ketanchoyal!

0.8.0 #

  • Updated dependency to firebase_auth ^3.0.0.
  • Implemented User.reload().

0.7.1 #

  • Implement User.metadata. Thanks mazzonem!

0.7.0 #

  • Removed dependency to Mockito.
  • Updated dependency to firebase_auth ^1.3.0.

0.6.0 #

  • Migrated to null safety. Thanks YusufAbdelaziz!
  • Updated dependency to firebase_auth ^1.0.1. Thanks zariweyo!

0.5.2 #

  • Typed the arguments of MockUser's constructor. Thanks YusufAbdelaziz!

0.5.1 #

  • Support for signInWithPhoneNumber.

0.5.0 #

Breaking change:

  • Require supplying a MockUser instead of returning 'Bob'. Thanks PieterHartzer!

Refer to README.md on how to use it.

0.4.0 #

  • Updated dependency to firebase_auth ^0.20.0+1. Thanks Aanu1995!

0.3.2 #

  • Support the newer authStateChanges() on top of the deprecated get onAuthStateChanged. Thanks gallrein!

0.3.1 #

  • Support User.isAnonymous.
  • Support User.email.

0.3.0 #

  • Support the breaking changes of firebase_auth 0.18.0+1.
  • Removed signInWithEmailAndLink since it's not part of the API anymore.

0.2.1 #

  • Added support for signInAnonymously and signOut. Thanks shepeliev!

0.2.0 #

  • Upgraded firebase_auth dependency to ^0.16.0.

0.1.3 #

  • Added support for signInWithEmailAndPassword, signInWithEmailAndLink and signInWithCustomToken.
  • Documented supported features

0.1.2 #

  • Implemented MockFirebaseUser.getIdToken(). Thanks dfdgsdfg!

0.1.1 #

  • Upgraded firebase_auth dependency to ^0.15.2.

0.1.0 #

  • Initial version.
89
likes
130
pub points
94%
popularity

Publisher

verified publisherwafrat.com

Fakes for Firebase Auth. Use this package with `google_sign_in_mocks` to write unit tests involving Firebase Authentication.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

dart_jsonwebtoken, equatable, firebase_auth, firebase_auth_platform_interface, firebase_core, flutter, meta, mock_exceptions, uuid

More

Packages that depend on firebase_auth_mocks