{"id":19519060,"url":"https://github.com/bizz84/firebase_auth_demo_flutter","last_synced_at":"2025-04-04T17:07:03.169Z","repository":{"id":45831086,"uuid":"179568378","full_name":"bizz84/firebase_auth_demo_flutter","owner":"bizz84","description":"Reference Authentication Flow with Flutter \u0026 Firebase","archived":false,"fork":false,"pushed_at":"2021-01-10T10:34:18.000Z","size":10913,"stargazers_count":670,"open_issues_count":26,"forks_count":177,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-03-28T16:06:08.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codewithandrea.com/","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bizz84.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-04T20:00:48.000Z","updated_at":"2025-03-11T06:10:39.000Z","dependencies_parsed_at":"2022-08-29T18:31:02.480Z","dependency_job_id":null,"html_url":"https://github.com/bizz84/firebase_auth_demo_flutter","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizz84%2Ffirebase_auth_demo_flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizz84%2Ffirebase_auth_demo_flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizz84%2Ffirebase_auth_demo_flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bizz84%2Ffirebase_auth_demo_flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bizz84","download_url":"https://codeload.github.com/bizz84/firebase_auth_demo_flutter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217178,"owners_count":20903009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T00:16:07.514Z","updated_at":"2025-04-04T17:07:03.133Z","avatar_url":"https://github.com/bizz84.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reference Authentication Flow with Flutter \u0026 Firebase\n\nThis forked project has been upgraded to the latest packages.\n\n[![Codemagic build status](https://api.codemagic.io/apps/5d8e174b125acf001aca4a45/5d8e174b125acf001aca4a44/status_badge.svg)](https://codemagic.io/apps/5d8e174b125acf001aca4a45/5d8e174b125acf001aca4a44/latest_build)\n\nYouTube video walk-throughs here: \n\n[![Flutter \u0026 Firebase: Reference Authentication Flow - Intro](media/firebase-auth-banner-youtube.png)](https://youtu.be/-Za1MspEt5I)\n\n[![Flutter \u0026 Firebase: Authentication Service with Provider \u0026 ValueNotifier](media/firebase-auth-service-provider-banner-youtube.png)](https://youtu.be/MjY1_LaXyd8)\n\nThis project shows how to implement a full authentication flow in Flutter, using various Firebase sign-in methods.\n\nIt aims to be a reference implementation. Think of it as \"authentication done right\".\n\n## Project goals\n\nThis project shows how to:\n\n- use the various Firebase sign-in methods\n- build a robust authentication flow\n- use appropriate state management techniques to separate UI, logic and Firebase authentication code\n- handle errors and present user-friendly error messages\n- write production-ready code following best practices\n\nFeel free to use this in your own projects. 😉\n\n_NOTE: This project will be kept up to date with the latest packages and Flutter version._\n\n## Preview\n\n![](media/firebase-auth-screens.png)\n\n**Google Sign-in**\n\n![](media/google-sign-in.gif)\n\n**Facebook Sign-in**\n\n![](media/facebook-sign-in.gif)\n\n**Email \u0026 Password auth**\n\n![](media/email-password-sign-in.gif)\n\n## Simplified widget tree\n\n![](media/simplified-widget-tree.png)\n\n## FirebaseAuth features\n\n### Supported sign-in methods\n\n- [x] Anonymous\n- [x] Email \u0026 Password\n- [x] Email link (passwordless) (see [documentation](docs/sign-in-email-link.md))\n- [x] Facebook\n- [ ] GitHub\n- [x] Google\n- [x] Apple\n- [ ] Phone\n- [ ] Twitter\n\n### Link account with third-party providers\n\n- [ ] Email \u0026 Password\n- [ ] Facebook\n- [ ] GitHub\n- [ ] Google\n- [ ] Phone\n- [ ] Twitter\n\n### Other authentication features\n\n- [ ] Email verification (for email \u0026 password sign-in)\n- [x] Password reset\n- [ ] Sign-in with custom token\n\n## Application features\n\n### Sign-in Page\n\n- [x] Navigation to email and password sign-in\n- [x] Apple sign-in\n- [x] Google sign-in\n- [x] Facebook sign-in\n- [x] Anonymous sign-in\n\n\n### Email \u0026 password page\n\n- [x] Custom submit button with loading state\n- [x] Disable all input widgets while authentication is in progress\n- [x] Email regex validation\n- [x] Error hints\n- [x] Focus order (email -\u003e password -\u003e submit by pressing \"next\" on keyboard)\n- [x] Password of at least 8 characters\n- [ ] Show/hide password\n- [x] Password reset flow\n\n### Email link page\n\n- [x] Email input field, backed by secure storage\n\n### Authentication\n\n- [x] Abstract `AuthService` class, modeled after the `firebase_auth` API\n- [x] `FirebaseAuthService` implementation\n- [x] `MockAuthService` for testing\n- [x] Firebase project configuration for iOS \u0026 Android\n- [x] Toggle `FirebaseAuthService` and `MockAuthService` at runtime via developer menu\n\n### Architecture\n\n- [x] Logic inside models for better separation of concerns (using [`ChangeNotifier`](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html))\n- [x] Use [Provider package](https://pub.dev/packages/provider) for dependency injection\n\n### Other\n\n- [x] Platform-aware alert dialogs for confirmation/error messages\n- [x] Fully compliant with the official Flutter `analysis_options.yaml` rules\n\n## TODO\n\n- [ ] Internationalization\n- [ ] Full test coverage\n- [ ] Improve documentation\n\n## Running the project with Firebase\n\nTo use this project with Firebase authentication, some configuration steps are required.\n\n- Create a new project with the Firebase console.\n- Add iOS and Android apps in the Firebase project settings.\n- On Android, use `com.codingwithflutter.firebase_auth_demo_flutter` as the package name (a SHA-1 certificate fingerprint is also needed for Google sign-in).\n- then, [download and copy](https://firebase.google.com/docs/flutter/setup#configure_an_android_app) `google-services.json` into `android/app`.\n- On iOS, use `com.codingwithflutter.firebaseAuthDemo` as the bundle ID.\n- then, [download and copy](https://firebase.google.com/docs/flutter/setup#configure_an_ios_app) `GoogleService-Info.plist` into `iOS/Runner`, and add it to the Runner target in Xcode.\n\nSee this document for full instructions:\n\n- [https://firebase.google.com/docs/flutter/setup](https://firebase.google.com/docs/flutter/setup) \n\nAdditional setup instructions for Google and Facebook sign-in:\n\n- Google Sign-In on iOS: [https://firebase.google.com/docs/auth/ios/google-signin](https://firebase.google.com/docs/auth/ios/google-signin)\n- Google Sign-In on Android: [https://firebase.google.com/docs/auth/android/google-signin](https://firebase.google.com/docs/auth/android/google-signin)\n- Facebook Login for Android: [https://developers.facebook.com/docs/facebook-login/android](https://developers.facebook.com/docs/facebook-login/android)\n- Facebook Login for iOS: [https://developers.facebook.com/docs/facebook-login/ios](https://developers.facebook.com/docs/facebook-login/ios)\n\n## Additional References\n\nA lot of the techniques used in this project are explained in great detail, and implemented step-by-step in my Flutter \u0026 Firebase Udemy course.\n\nThis is available for early access at this link (discount code included):\n\n- [Flutter \u0026 Firebase: Build a Complete App for iOS \u0026 Android](https://www.udemy.com/flutter-firebase-build-a-complete-app-for-ios-android/?couponCode=DART15\u0026password=codingwithflutter)\n\n\n## [License: MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbizz84%2Ffirebase_auth_demo_flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbizz84%2Ffirebase_auth_demo_flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbizz84%2Ffirebase_auth_demo_flutter/lists"}