PackageTrack
Sign in Get early access

firebase_auth_mocks

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

0.15.2 103K downloads/mo #1113 most downloaded on pub.dev atn832/firebase_auth_mocks

What this package is like to depend on

Last release 3 months ago

16 May 2026

Release timing varies

gaps range from 3 weeks to 9 months

Nearly every release is documented

notes for 43 of 43 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

43 releases · first in 2019

2 releases in the last 12 months

see the full history below

Release timeline

43 releases · Nov 2019 to May 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 43
  1. 0.15.2 16 May 2026
    Release notes

    Upgraded firebase_auth_platform_interface dependency to ^9.0.0. PR-127. Thank you Wim-Hexagons!

    Open source →
  2. 0.15.1 26 Sep 2025
    Release notes

    Implemented idTokenChanges. PR-125. Thank you vinifig!

    Open source →
  3. 0.15.0 31 Jul 2025
    Release notes
    • Upgraded firebase_auth dependency to ^6.0.0. PR-120. Thank you jt274!
    • Removed fetchSignInMethodsForEmail, which was removed in firebase_auth 6.0.0. PR-123.
    Open source →
  4. 0.14.2 03 Jun 2025
    Release notes
    • Adds a maybeThrow into verifyPhoneNumber and User.verifyBeforeUpdateEmail. PR-113, PR-116. Thank you Tpow99!
    • Upgraded dart_jsonwebtoken from ^2.4.1 to ^3.2.0. PR-115. Thank you reedpro!
    Open source →
  5. 0.14.1 05 Sep 2024
    Release notes
    • Allow setting mockUser to null. PR-112.
    • Support throwing mock exceptions from signOut. PR-111.

    Thank you michaelowolf!

    Open source →
  6. 0.14.0 05 Jun 2024
    Release notes

    Upgraded firebase_auth dependency to ^5.0.0. PR-108

    Open source →
  7. 0.13.0 19 Oct 2023
    Release notes

    Upgraded uuid to ^4.1.0 and firebase_auth_platform_interface to ^7.0.0. Thank you Rexios80 and https://github.com/kody-liou!

    Open source →
  8. 0.12.0 16 Jul 2023
    Release notes
    Open source →
  9. 0.11.0 13 Mar 2023
    Release notes
    • 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).
    Open source →
  10. 0.10.3 10 Jan 2023
    Release notes

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

    Open source →
  11. 0.10.2 09 Jan 2023
    Release notes

    Implemented authForFakeFirestore for Fake Cloud Firestore's security rules.

    Open source →
  12. 0.10.2+1 09 Jan 2023
    Release notes

    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.

    Open source →
  13. 0.10.1 08 Jan 2023
    Release notes

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

    Open source →
  14. 0.10.0 08 Jan 2023
    Release notes

    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.

    Open source →
  15. 0.9.3 08 Jan 2023
    Release notes
    • Implemented FirebaseAuth.signInWithPopup and FirebaseAuth.signInWithProvider. Thanks ga-bri-el!
    Open source →
  16. 0.9.2 29 Nov 2022
    Release notes
    • 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!
    Open source →
  17. 0.9.1 06 Nov 2022
    Release notes
    • Implemented FirebaseAuth.fetchSignInMethodsForEmail. Thanks BenVercammen!
    • Implemented User.linkWithCredential. Thanks BenVercammen!
    • Support setting a customClaim for User.getIdToken. Thanks kody-liou!
    Open source →
  18. 0.9.0 22 Oct 2022
    Release notes
    • Updated dependency to firebase_auth ^4.0.0.
    Open source →
  19. 0.8.7 22 Oct 2022
    Release notes
    • 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!
    Open source →
  20. 0.8.6 23 Sep 2022
    Release notes
    • Implemented generation of proper JWT token in User.getIdToken. Thanks kody-liou!
    • Implemented sendSignInLinkToEmail, confirmPasswordReset and verifyPasswordResetCode in FirebaseAuth. Thanks Zohenn!
    Open source →
  21. 0.8.5 25 Jul 2022
    Release notes
    • 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!
    Open source →
  22. 0.8.5+1 25 Jul 2022
    Release notes
    • Added missing changelogs.
    Open source →
  23. 0.8.4 05 Apr 2022
    Release notes
    • 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!
    Open source →
  24. 0.8.3 29 Mar 2022
    Release notes
    • Implemented User methods reauthenticateWithCredential, updatePassword and delete with the ability to throw exceptions. Thanks defuncart!
    • Implemented createUserWithEmailAndPassword. Thanks f-hoedl!
    Open source →
  25. 0.8.2 26 Dec 2021
    Release notes
    • 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!
    Open source →
  26. 0.8.1 15 Sep 2021
    Release notes
    • Implemented FirebaseAuth.userChanges. Thanks mazzonem!
    • Implemented User.updateDisplayName. Thanks oudehomar!
    • Implemented FirebaseAuth.fetchSignInMethodsForEmail. Thanks ketanchoyal!
    Open source →
  27. 0.8.0 16 Jul 2021
    Release notes
    • Updated dependency to firebase_auth ^3.0.0.
    • Implemented User.reload().
    Open source →
  28. 0.7.1 14 Jun 2021
    Release notes
    • Implement User.metadata. Thanks mazzonem!
    Open source →
  29. 0.7.0 06 Jun 2021
    Release notes
    • Removed dependency to Mockito.
    • Updated dependency to firebase_auth ^1.3.0.
    Open source →
  30. 0.6.0 13 Mar 2021
    Release notes
    • Migrated to null safety. Thanks YusufAbdelaziz!
    • Updated dependency to firebase_auth ^1.0.1. Thanks zariweyo!
    Open source →
  31. 0.5.2 25 Feb 2021
    Release notes
    • Typed the arguments of MockUser's constructor. Thanks YusufAbdelaziz!
    Open source →
  32. 0.5.1 25 Jan 2021
    Release notes
    • Support for signInWithPhoneNumber.
    Open source →
  33. 0.5.0 25 Jan 2021
    Release notes

    Breaking change:

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

    Refer to README.md on how to use it.

    Open source →
  34. 0.4.0 20 Jan 2021
    Release notes
    • Updated dependency to firebase_auth ^0.20.0+1. Thanks Aanu1995!
    Open source →
  35. 0.3.2 05 Oct 2020
    Release notes
    • Support the newer authStateChanges() on top of the deprecated get onAuthStateChanged. Thanks gallrein!
    Open source →
  36. 0.3.1 05 Sep 2020
    Release notes
    • Support User.isAnonymous.
    • Support User.email.
    Open source →
  37. 0.3.0 05 Sep 2020
    Release notes
    • Support the breaking changes of firebase_auth 0.18.0+1.
    • Removed signInWithEmailAndLink since it's not part of the API anymore.
    Open source →
  38. 0.2.1 13 Jul 2020
    Release notes
    • Added support for signInAnonymously and signOut. Thanks shepeliev!
    Open source →
  39. 0.2.0 10 May 2020
    Release notes
    • Upgraded firebase_auth dependency to ^0.16.0.
    Open source →
  40. 0.1.3 20 Mar 2020
    Release notes
    • Added support for signInWithEmailAndPassword, signInWithEmailAndLink and signInWithCustomToken.
    • Documented supported features
    Open source →
  41. 0.1.2 11 Feb 2020
    Release notes
    • Implemented MockFirebaseUser.getIdToken(). Thanks dfdgsdfg!
    Open source →
  42. 0.1.1 16 Dec 2019
    Release notes
    • Upgraded firebase_auth dependency to ^0.15.2.
    Open source →
  43. 0.1.0 15 Nov 2019
    Release notes
    • Initial version.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive