Skip to content

Commit d3f3ef3

Browse files
authored
Merge pull request #26 from FlutterFlow/update/firebase-docs-cloud-fn-faq-2
Update Firebase: Sample Data, FAQ
2 parents 3050c6c + 53c60cc commit d3f3ef3

File tree

5 files changed

+49
-6
lines changed

5 files changed

+49
-6
lines changed

docs/integrations/firebase.md

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Once complete, Dreamflow will confirm the connection with a **Connected** status
4848
</div>
4949
<p></p>
5050

51-
### First-Time Firebase Project Setup
51+
### Initial Firebase Project Setup
5252

5353
If this is your first time connecting to Firebase, you must create a new project in the Firebase Console and accept the Terms of Service before continuing.
5454

@@ -250,17 +250,55 @@ Here’s an example of enabling email/password authentication:
250250

251251
Dreamflow lets you add sample data to your Firebase project for easier development and testing. The generated data follows your app’s schema, so you can quickly check how your app works with populated users, collections, and documents.
252252

253-
To add sample data from Dreamflow, go to the **Firebase** module **> Add Sample Data to Firebase**. Enter the email address of your test account in the **User Email** field. This account will be associated with the generated sample data. Click **Generate Sample Data**.
253+
To add sample data from Dreamflow, go to the **Firebase > Sample Data**, and follow the instructions below:
254254

255-
Once the process is complete, you will see the generated sample data entries inside your **Cloud Firestore** under the respective collections defined in your schema.
255+
- **For Apps with Login Functionality:** First, sign up in your app using an email and password. After logging in, enter the same email address in the **User Email** field and click **Generate Sample Data**. This will generate sample records linked to that user account.
256+
257+
![add-sample-data-firebase-with-login.avif](imgs/add-sample-data-firebase-with-login.avif)
258+
259+
- **For Apps without Login Functionality:** You can skip the email step, as it’s optional. Simply click **Generate Sample Data** to generate test documents directly in your Firestore Database.
260+
261+
![add-sample-data-firebase-without-login.avif](imgs/add-sample-data-firebase-wihtout-login.avif)
262+
263+
:::warning
264+
265+
You can only generate sample data **once.** If you need to modify or remove the sample data later, you can do so directly in the **Firebase Console** under **Firestore Database**.
266+
267+
:::
256268

257269
:::info
258270

259271
This process only inserts sample data into the **Firestore Database** for the specified user email. It does **not** create a user in Firebase Authentication. Make sure the user with the specified email exists in Firebase Authentication to be able to access the data.
260272

261-
:::
273+
You can directly add a user to Firebase Authentication. To do so, open the Firebase Console and navigate to **Authentication > Users**. Click **Add user** in the top-right corner, enter the user’s email and password, and then click **Add User** to create the account.
262274

263-
![add-sample-data.avif](imgs/add-sample-data.avif)
275+
<div style={{
276+
position: 'relative',
277+
paddingBottom: 'calc(52.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
278+
height: 0,
279+
width: '100%'}}>
280+
<iframe
281+
src="https://demo.arcade.software/VYKJVNzPMjQjb8wU4mcJ?embed&show_copy_link=true"
282+
title=""
283+
style={{
284+
position: 'absolute',
285+
top: 0,
286+
left: 0,
287+
width: '100%',
288+
height: '100%',
289+
colorScheme: 'light'
290+
}}
291+
frameborder="0"
292+
loading="lazy"
293+
webkitAllowFullScreen
294+
mozAllowFullScreen
295+
allowFullScreen
296+
allow="clipboard-write">
297+
</iframe>
298+
</div>
299+
<p></p>
300+
301+
:::
264302

265303
## Enable Billing
266304

@@ -298,9 +336,12 @@ To enable billing on your Firebase project, open the Firebase Console. On the pr
298336

299337
## FAQs
300338
<details>
301-
<summary> Why do cloud function deployments fail? </summary>
339+
<summary>
340+
Why am I getting the error `functions predeploy error: Command terminated with non-zero exit code 2` when deploying Cloud Functions from Dreamflow?
341+
</summary>
302342

303343
<p>
344+
![cloud-fn-deploy-failed](imgs/cloud-fn-deploy-failed.avif)
304345
Cloud function deployments usually fail when your Google Cloud Platform (GCP) or Firebase project hasn’t been fully set up with the necessary APIs and permissions.
305346

306347
By default, when you create a new Firebase project, some APIs required by Cloud Functions are not enabled automatically. In addition, the default compute service account may not have the correct roles to deploy functions. Without these APIs and permissions, Dreamflow cannot deploy functions successfully, and you’ll see deployment errors.
29.4 KB
Binary file not shown.
52.1 KB
Binary file not shown.
111 KB
Binary file not shown.

docs/integrations/supabase.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,7 @@ Why can’t I log in with the email I used to generate sample data?
200200
If you generated sample data before adding authentication to your app, logging in with that same email will fail — and this is expected behavior.
201201

202202
When sample data is created, it inserts records directly into the Supabase database, including user details, but it doesn’t go through the actual authentication process. As a result, those users exist in the database but don’t have valid authentication credentials in Supabase Auth.
203+
204+
To fix it, you can delete the dummy user record from the Auth table and then sign up again in your app with that email.
203205
</p>
204206
</details>

0 commit comments

Comments
 (0)