flutter_auth_firebase 0.3.0

  • Readme
  • Changelog
  • Installing
  • 52

flutter_auth_firebase #

This package is a wrapper to FlutterFire package so that it can be used with the Authentication Starter project

https://pub.dartlang.org/packages/flutter_auth_firebase

Setup #

As a prerequisite to using firebase authentication you need to follow the instruction provided by the FlutterFire package.

At a minumum the dependencies required are:

Implement #

Example code of using the package

The Google provider is from https://github.com/aqwert/flutter_auth_firebase_google

Imports:

import 'package:flutter_auth_base/flutter_auth_base.dart';
import 'package:flutter_auth_firebase/flutter_auth_firebase.dart';
AuthService createFirebaseAuthService() {
  var authService = new FirebaseAuthService();
  authService.authProviders.addAll([
    new FirebaseEmailProvider(service: authService),
    new FirebaseGoogleProvider(service: authService)
  ]);
  authService.linkProviders.addAll([
    new FirebaseEmailProvider(service: authService),
    new FirebaseGoogleProvider(service: authService)
  ]);

  return authService;
}

.authProviders #

These are the authentication providers that are supported by the application and need to be set within the Firebase console. The ones supported by this package are:

  • Email with Password
  • Google Signin

.linkProviders #

These represent the authenticaton providers that allow linking or connecting multiple accounts together which is supported by Firebase

.preAuthPhotoProvider, .postAuthPhotoProvider #

Additionally the authService.preAuthPhotoProvider and/or authService.postAuthPhotoProvider can be configured to return a profile picture. See the flutter_auth_starter project for details.

TODO #

  • [x] Google provider
  • [ ] Twitter provider
  • [ ] Facebook provider
  • [ ] Anonymous Signin
  • [ ] Passwordless signin
  • [ ] Verification by phone

Issues and Feedback #

Since this is based on the FlutterFire package there are some things not yet implemented in order for this package to be supported.

Please create an issue to provide feedback or an issue.

[0.3.0] - 29 August 2018

  • Dart 2.1 Compatible

[0.2.2] - 02 August 2018

  • Changed the listener to onAuthStateChanged.

[0.2.1] - 20 July 2018

  • Force refesh of firebase token

[0.2.0] - 10 July 2018

  • Removed Google signin as a dependency. This is now a separate project

[0.1.0] - 29 May 2018

  • Firebase authentication with Email and Google signin

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_auth_firebase: ^0.3.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_auth_firebase/flutter_auth_firebase.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
38
Overall:
Weighted score of the above. [more]
52
Learn more about scoring.

We analyzed this package on Nov 19, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

54 out of 54 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (firebase_auth).

Package is getting outdated. (-22.19 points)

The package was last published 63 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and flutter_auth_firebase.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <3.0.0
firebase_auth ^0.5.10 0.5.20 0.15.0
flutter 0.0.0
flutter_auth_base ^0.3.1 0.3.1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test