firebase_auth_vm 0.0.3

Dart native
Flutter Android iOS

Dart implementation of Firebase Auth SDK that offers secure End-To-End Authentication

Firebase Auth Dart SDK - CLI example app #

Install #

All needed dependencies are provided by the [PlatformDependencies]. The current implementation uses hive to store the current user and his tokens.

class Dependencies extends PlatformDependencies {
  Dependencies({@required this.box}) : headersBuilder = null;

  @override
  final Box<dynamic> box;

  @override
  final HeaderBuilder headersBuilder;

  @override
  InternalTokenProvider get authProvider => null;

  @override
  AuthUrlPresenter get authUrlPresenter => null;

  @override
  bool get isBackground => false;

  @override
  Future<bool> get isNetworkConnected => Future<bool>.value(true);

  @override
  String get locale => 'en';

  @override
  Stream<bool> get isBackgroundChanged => Stream<bool>.fromIterable(<bool>[false]);
}

Initialize #

You just need to initialize you're FirebaseApp then you are ready to go.

  final Box<dynamic> firebaseBox =
      await Hive.openBox<dynamic>('firebase_auth', encryptionKey: _hiveEncryptionKey.codeUnits);
  final Dependencies dependencies = Dependencies(box: firebaseBox);
  final FirebaseOptions options = FirebaseOptions(apiKey: _apiKey, applicationId: 'appId');
  FirebaseApp.withOptions(options, dependencies);

After this you can use FirebaseAuth.instance for the default Firebase App or FirebaseAuth.getInstance(FirebaseApp app) for a specify Firebase App.

##Disclaimer This is still under heavy development and it still has some roughs edges. Please make sure to open an issue or a pull request if you found something. Thanks :D

0
likes
80
pub points
50%
popularity

Publisher

long1.eu

Dart implementation of Firebase Auth SDK that offers secure End-To-End Authentication

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache 2.0 (LICENSE)

Dependencies

_discoveryapis_commons, _firebase_internal_vm, firebase, firebase_core_vm, googleapis, googleapis_auth, http, meta, rxdart

More

Packages that depend on firebase_auth_vm