An experimental dart package that mocks (emulates) the firebase_auth plugin for quick and offline development.
Intended to be used solely for development.
- Depend on the package by adding it to your pubspec.yaml dependencies.
- Import the library.
When using this package alongside the official firebase plugin, it's advisable to import with a prefix to prevent conflict since it has same class names except
LocalFirebaseAuth (ofc :stuck_out_tongue_winking_eye:). Eg.
import 'package:local_firebase_auth/local_firebase_auth.dart' as localAuth;
- Be sure to initialize the package before using. An exception will be raised if the package is not initialized before usage.
- Use it as you would the official plugin. For instance, you can create a new user as:
final UserCredential result = await LocalFirebaseAuth.instance.createUserWithEmailAndPassword( email: email, password: pass, ); final User user = result.user; print(user.uid);
Since this is a mock and experimental package, it is in no way meant as a replacement for Firebase but for use quick and offline development use-cases.
The following methods are currently available:
Get Current User
final User user = LocalFirebaseAuth.instance.currentUser;
This project is fully open-source. Feel free to contribute to this project.
Official Plugins Documentation
This project has been licensed under the MIT License.
MIT License Copyright (c)  [Akora Ing. DKB] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.