This guide will walk you through the steps to configure Firebase Authentication in your Flutter project.
- Open the Firebase Console.
- Select your project or create a new one.
- In the Firebase Console, go to Authentication from the left-hand sidebar.
- Click on the Get Started button.
- Choose Google as a sign-in method and enable it.
- Click Save to apply the changes.
Here are the two tables with images as requested:
Step | Image |
---|---|
1. Go to Firebase Console and choose Authentication | ![]() |
2. Click on "Get Started" to initialize the setup | ![]() |
Step | Image |
---|---|
1. Enable Google Authentication in Firebase Console | ![]() |
2. Enable it and save the settings | ![]() ![]() |
If you're configuring Firebase for Android, you need to add the correct fingerprints for your app:
- Open a terminal and run the following command to get your debug keystore fingerprint:
keytool -list -v -keystore C:\Users\<your-username>\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
-
Go to Project Settings in the Firebase Console.
-
Add the fingerprints you obtained from the command above.
Action | Screenshot |
---|---|
Go to Project Settings | ![]() |
Obtain Fingerprints Using Command | ![]() |
Add Fingerprints in Firebase | ![]() ![]() |
If you're working on a web app, you need to configure the Firebase settings in your web project:
- Go to the Firebase Console and select your project.
- In Project Settings, under the General tab, find your Firebase web configuration.
- Follow the instructions to add the configuration to your
/web/index.html
file.
Once you’ve completed the setup in the Firebase Console, run the following command in your terminal to update your Flutter project with the latest Firebase configurations:
flutterfire configure
This will refresh your Flutter project to ensure the changes you made on the Firebase Console are reflected in your app.