Comment on page
Initial Setup
To use authentication, you will need to complete the following initial setup:
- If you plan to use Google Sign-In or Phone Sign-In, you will also need to complete the Google/Phone Sign-In setup.
Skip if you have already enabled authentication while creating a new project with a Firebase setup.
To enable authentication in FlutterFlow:
- 1.Open your FlutterFlow project.
- 2.Open Setting and Integrations () > App Settings > Authentication.
- 3.Turn on the Enable Authentication toggle and select Authentication Type to Firebase.
- 4.To ensure that your users are directed to the appropriate pages based on their login status, you must set the initial pages.

Enabling authentication in FlutterFlow
The 'user' collection stores the information for authenticated users.
Skip if you have already enabled 'Create User Collection' while creating a new project with a Firebase setup.
Use these steps to create the 'users' collection:
- 1.Click on the Firestore from the Navigation Menu (left side of your screen).
- 2.Click on the + Create Collection button. If you have any other collection already added, you can click on the Plus button ().
- 3.Enter a collection_name (this can be anything, but we recommend 'users') and click on Create button.
- 4.If you enter 'users' a popup will open which asks you to populate this collection with default fields. You can click Yes, and we will add all the fields.
- 5.If you skipped the previous popup but still want to add default fields, you can:
- 1.Switch to the Settings tab.
- 2.Find the Users Collection switch and enable it.
- 3.Find the Collection dropdown below, click on the Unset, and select the name of the collection you just created.
- 4.Now switch to the Collection tab. Now you should see all the default fields.
You do not need to create a password field. This is handled separately by Firebase.
To use the Google or Phone sign-in, you must go through the following steps.
If you aren't planning to use Google or Phone Sign-In, you can skip these steps.
An SHA-1 key (aka the 'Secure Hash Algorithm') is required if you want to use Google Sign-in and Phone Sign-in. To learn more about the SHA-1 key, see this link.
You can generate the SHA-1 key by entering the following command in your terminal with these steps:
- 1.Open a terminal window:
- Mac: Use the Launchpad () or press (⌘ + Spacebar) for Spotlight search, type 'Terminal', and open it.
- Windows: Click the Windows icon, navigate to the 'Windows System' folder, and open 'Command Prompt' either by clicking or right-clicking it.
- 2.Copy the following command (based on your operating system) and select Enter.
Windows
Mac/Linux
keytool -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
If you get the following error while trying the above command:
ERROR:'keytool' is not recognized as an internal or external command
You might not have JAVA installed on your machine. Here is the helpful link to install JAVA and remove the above issue.
keytool -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore
- 3.After being prompted for the key password, type 'android' and press 'Enter'. Note: For security reasons, you won't see the password as you type it.
.gif?alt=media&token=13620f83-9086-4b32-8f79-aa6cde4e3271)
Generate SHA-1 key
To add the SHA-1 key in the Firebase Console:
- 1.
- 2.Scroll down to Your App section.
- 3.Select your Android App from the left side menu.
- 4.Find the SHA certificate fingerprints section and click on the Add fingerprint.
- 5.Enter the generated SHA-1 into the Certificate fingerprint input box.
- 6.Click on the Save button.
After adding the SHA-1 key you must re-generate the config files in FlutterFlow.
To regenerate the config files:
- 1.Return to FlutterFlow. From the Navigation Menu, select Settings & Integrations > Project Setup > Firebase.
- 2.Click on the Regenerate Config Files.

Regenerating config files
Last Updated Date: August 22, 2023
Last modified 3mo ago