flutter_auth_firebase 0.3.0

flutter_auth_firebase #

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


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


import 'package:flutter_auth_base/flutter_auth_base.dart';
import 'package:flutter_auth_firebase/flutter_auth_firebase.dart';
AuthService createFirebaseAuthService() {
  var authService = new FirebaseAuthService();
    new FirebaseEmailProvider(service: authService),
    new FirebaseGoogleProvider(service: authService)
    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.


  • [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:

  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';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

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. (-48.22 points)

The package was last published 77 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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <3.0.0
firebase_auth ^0.5.10 0.5.20 0.15.4
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.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies