Skip to content
Shared Mobile and Web Firebase Login
Dart C++ Ruby Makefile Batchfile C Other
Branch: master
Clone or download
Latest commit c76a274 Nov 12, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Initial commit Sep 5, 2019
.vscode Initial commit Sep 5, 2019
lib Update io.dart Nov 1, 2019
test Initial commit Sep 5, 2019
.DS_Store updating desktop projects Oct 2, 2019
.gitignore Initial commit Sep 5, 2019
.metadata Initial commit Sep 5, 2019 updating to bloc 2.0.0 Nov 12, 2019
LICENSE Initial commit Sep 5, 2019 Update Oct 2, 2019
fb_auth.iml Initial commit Sep 5, 2019
pubspec.yaml updating to bloc 2.0.0 Nov 12, 2019


A Shared Firebase Auth Plugin for Mobile, Web and Desktop. Included AuthBloc for minimal setup! Single dynamic import and compile time ready for ios, android, macos, windows, linux and web.

Getting Started

Setup your Bloc

final _auth = AuthBloc();

Follow Installation Instructions for Web:

Update /web/index.html in the body tag.

<!-- The core Firebase JS SDK is always required and must be listed first -->
  <script src=""></script>

  <!-- TODO: Add SDKs for Firebase products that you want to use -->
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>

    // Your web app's Firebase configuration
    var firebaseConfig = {
      apiKey: "API_KEY",
      authDomain: "AUTH_DOMAIN",
      databaseURL: "DATABASE_URL",
      projectId: "PROJECT_ID",
      storageBucket: "STORAGE_BUCKET",
      messagingSenderId: "MESSAGING_SENDER_ID",
      appId: "APP_ID"
    // Initialize Firebase

Follow Installation Instructions for Mobile:

  • Update ios/Runner and add the GoogleService-Info.plist downloaded from firebase

  • Update android/app and add the google-services.json downloaded from firebase

  • Update android/build.gradle and update the classpath:

    classpath ''


  • Check Current User
  • Listen for Auth Changes
_userChanged = _fbAuth.onAuthChanged().listen((user) {
  • Logout
  • Login
_auth.dispatch(LoginEvent(_email, _password));
  • Guest
  • Create Account
_auth.dispatch(CreateAccount(_email, _password, displayName: _name));
  • Edit Info
_auth.dispatch(EditInfo(displayName: _name));
  • Forgot Password
  • Send Email Verification
You can’t perform that action at this time.