The Complete Flutter Course: Build Android, iOS and Web Apps
Flutter sign-in with Firebase and Google
User accounts are where many first apps stall: forms, error messages, Google's sign-in and keeping track of who is signed in. This guide picks out the lessons of The Complete Flutter Course: Build Android, iOS and Web Apps where the budget app gets its sign-in, on phones and the web, through Firebase Authentication, and is plain that the Google Sign-In package has changed since the lessons were recorded.
Taught by Sagnik Bhattacharya and Paulina Knop
What you will be able to do
You will be able to:
- Build a login screen with email and password fields, and register users with Firebase Authentication.
- Log users in with signInWithEmailAndPassword and show Firebase's errors in a clean pop-up.
- Add Google Sign-In for the web and for phones, and turn Google's tokens into a Firebase credential.
- Give the login page its own web layout, with a password field that can be shown or hidden.
- Log users out from a drawer, and hand the sign-in state to widgets through a StreamProvider.
Projects
What you will build.
The course has nine projects. This one matters most here.
-
Project 08
Budget app
Email and Google sign-in through Firebase Authentication, built for phones and the web, with the app's data kept for each signed-in user.
Lessons
The lessons that matter, in course order.
The Complete Flutter Course: Build Android, iOS and Web Apps has 223 lessons. This page picks out 19 of them, 3 h 8 min of video. Each lesson keeps its number in the course.
Where to start
Lesson 169 Set up Firebase, Riverpod and the login screen
Start at Lesson 169, where the budget app begins with Firebase, Riverpod and the login screen. Firebase set-up itself is taught on the portfolio from Lesson 123, worth watching first if the FlutterFire CLI is new to you.
19 of 223 lessons · 3 h 8 min
22 Budget App using Flutter Riverpod and MVVM architecture The budget app's sign-in from the first screen: registration and log-in by email, error pop-ups cleaned with RegExp, Google Sign-In on the web and on phones, and a web login page, tested on Chrome and a phone.
- 169 Start here Set up Firebase, Riverpod and the login screen Three platforms, sign-in state, and email and password fields 1 h
- 170 Creating a custom reusable widget An Open Sans text widget and the styled register button 4 min
- 171 Rows and user registration Why a Row re-centres the Column, then registering by email 4 min
- 172 Error pop-ups An AlertDialog that shows Firebase's error messages 7 min
- 173 Cleaning error messages with RegExp Strip the bracketed code from Firebase errors with replaceAll 4 min
- 174 Creating the log-in button An OR label, then signInWithEmailAndPassword and its errors 6 min
- 175 Registering and logging in to the app Test both buttons on Chrome after an emulator network bug 4 min
- 176 Creating the Google Sign-In button The sign_button package and kIsWeb to pick web or mobile 3 min
- 177 Google Sign-In functions for web and mobile A pop-up on the web and the google_sign_in package on phones 5 min
- 178 Connecting Google Sign-In to Firebase Auth Turn Google tokens into a credential for signInWithCredential 2 min
- 179 Google button wiring and the web login page Pick the web or mobile sign-in, then start the web layout 4 min
- 180 Adding image assets The login illustration and logo on the web login page 2 min
- 181 Email field for the web login A TextFormField with rounded borders and an email icon 5 min
- 182 Password field for the web login A show-or-hide toggle, then the start of the register button 3 min
- 183 Register and log-in buttons for the web Styled buttons with an OR label, wired to the view model 4 min
- 184 The Google Sign-In button on the web A large Google button, kIsWeb and a placeholder dashboard 3 min
- 185 Testing sign-in on the web and a phone Email and Google sign-in on Chrome, Google on a phone 4 min
22 Budget App using Flutter Riverpod and MVVM architecture A log-out button in the dashboard's drawer that calls signOut.
- 188 Log-out button in the drawer AppBar icon theme, then signOut from a styled button 6 min
23 Budget app: performance optimisation and code reuse The sign-in check moved into a Riverpod StreamProvider to stop endless rebuilds, with the login fields and buttons turned into shared widgets.
- 216 Performance optimisation and code reuse StreamProvider for sign-in, shared widgets and a model class 58 min
Instructors
Who teaches it.
Instructor, Flutter
Paulina Knop
Flutter developer and curriculum designer. Teaches the Flutter course.
Questions
Asked before starting.
Which Flutter course shows how to build a login with Firebase Authentication?
The Complete Flutter Course: Build Android, iOS and Web Apps from Coding Liquids builds one in its budget app: a login screen with email and password, registration, Firebase's error messages in a pop-up, Google Sign-In on the web and on phones, and log-out from the drawer, later tidied with a StreamProvider. This guide picks out 19 lessons (3 hours 8 minutes) on sign-in; it does not cover Sign in with Apple or phone numbers.
Does it cover registering and logging in with email and password?
Yes. The Complete Flutter Course: Build Android, iOS and Web Apps registers users by email at Lesson 171, adds a log-in button that calls signInWithEmailAndPassword at Lesson 174, and tests both on Chrome at Lesson 175. The web layout of the login page follows, with an email field, a password field you can show or hide, and styled buttons.
Does it add Google Sign-In on the web and on phones?
Yes, with a caveat. The Complete Flutter Course: Build Android, iOS and Web Apps builds a Google button that uses kIsWeb to pick the web or the mobile route, signs in through a pop-up on the web and the google_sign_in package on phones, and turns Google's tokens into a Firebase credential at Lesson 178. That package has since changed how sign-in starts on phones, so follow its current documentation alongside the lessons.
How are Firebase's error messages shown to users?
In a pop-up. The Complete Flutter Course: Build Android, iOS and Web Apps catches the error Firebase returns, such as a wrong password or an email already in use, and shows its message in an AlertDialog at Lesson 172, then strips the bracketed code out of the message with a regular expression at Lesson 173, so users read a plain sentence.
How does the app remember who is signed in, and how do users log out?
Firebase Authentication keeps a user signed in between visits, and the app reads that state rather than storing it: The Complete Flutter Course: Build Android, iOS and Web Apps starts the budget app with a sign-in check and later moves it into a Riverpod StreamProvider at Lesson 216, which hands widgets the sign-in state as it changes. Users log out from a button in the drawer, built at Lesson 188.
Does the course cover Sign in with Apple, phone sign-in or password resets?
No. The Complete Flutter Course: Build Android, iOS and Web Apps teaches email and password and Google sign-in only: Sign in with Apple, phone-number sign-in, password reset emails and email verification are not taught. Firebase Authentication supports all of them, and once the budget app's flow works, each one follows the same pattern of a button, a Firebase call and its errors shown in a pop-up.
Flutter
See the whole course.
The Complete Flutter Course: Build Android, iOS and Web Apps: 25 hours of video in 223 lessons, built around 9 projects, with lifetime access, a Certificate of Completion and a 14-day money-back guarantee.
The same course
For another background, goal, topic or comparison.
By background
By goal
By topic
- Dart
- State management
- Firebase
- Widgets and layouts
- UI design and styling
- Riverpod
- App architecture
- Cloud Firestore
- REST APIs with Dio
- Navigation and routing
- Responsive layouts
- Animations and gestures
- Flutter web
- Set-up on Windows and Mac
- Forms and validation
- Futures and Streams
- CI with GitHub Actions
- Reusable widgets
- Debugging
- Packages from pub.dev
Comparisons
- Flutter or React Native
- Which framework to learn
- Course or free tutorials
- Flutter or native Android
- Flutter or Swift
- Flutter or Kotlin Multiplatform
- Flutter or FlutterFlow
- Learn Flutter or use AI
- Riverpod, BLoC or Provider
- Firebase or Supabase
- Flutter web or React
- Dart or JavaScript
- Flutter or Ionic
- Flutter or .NET MAUI
- VS Code or Android Studio