local_firebase_auth 0.1.0 copy "local_firebase_auth: ^0.1.0" to clipboard
local_firebase_auth: ^0.1.0 copied to clipboard

discontinued
outdated

An experimental dart package that mocks (emulates) the firebase_auth plugin for quick and offline development.

local_firebase_auth #

Pub Github Master Workflow Status Github Language License

An experimental dart package that mocks (emulates) the firebase_auth plugin for quick and offline development.

Intended to be used solely for development. #

Usage #

  1. Depend on the package by adding it to your pubspec.yaml dependencies.
    local_firebase_auth: <latest_version>

  2. Import the library.

import 'package:local_firebase_auth/local_firebase_auth.dart';

When using this package alongside the official firebase plugin, it's advisable to import with a prefix to prevent conflict since it same class names except LocalFirebaseAuth (ofc 😜). Eg.

import 'package:local_firebase_auth/local_firebase_auth.dart' as localAuth;
  1. Be sure to initialize the package before using. An exception will be raised if the package is not initialized before usage.
LocalFirebaseAuth.initialize('appName');
  1. 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);

Supported methods #

Since this is a mock and experimental package, it is in no way meant as a replace for Firebase but for use quick and offline development use-cases.
The following methods are currently available:

Method Signature Parameters
createUserWithEmailAndPassword Future<UserCredential> String email, String password
signInAnonymously Future<UserCredential> None
signInWithEmailAndPassword Future<UserCredential> String email, String password
signOut Future<void> None

Get Current User #

final User user = LocalFirebaseAuth.instance.currentUser;

Contributing #

This project is fully open-source. Feel free to open issues when you realize one and PRs are welcome as well.

Official Plugins Documentation #

For the full documentation of the official Firebase plugins, please see the documentation available at https://firebase.flutter.dev

License #

This project has been licensed under the MIT License. Check the LICENSE file for the details.

3
likes
0
points
2
downloads

Publisher

verified publisherakora-ingdkb.me

Weekly Downloads

An experimental dart package that mocks (emulates) the firebase_auth plugin for quick and offline development.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

hive, meta, random_string

More

Packages that depend on local_firebase_auth