You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/troubleshooting/authentication/check_firebase_login_method.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Understanding which authentication method a user has used can be useful for seve
10
10
In our Flutter app, we can find out which method a user used to authenticate by leveraging Firebase's `User.providerData` property. Let's take a closer look at how this works in the code:
11
11
12
12
13
-
```
13
+
```js
14
14
import'package:firebase_auth/firebase_auth.dart';
15
15
16
16
StringgetUserSignInMethod() {
@@ -35,25 +35,24 @@ Here's a breakdown of the code:
35
35
- Inside the function, we obtain the current user from FirebaseAuth using `FirebaseAuth.instance.currentUser`.
36
36
37
37
- We then declare a string `signInMethod` that will store the name of the provider used for sign-in.
38
+
39
+
-`user.providerData` is an iterable that provides UserInfo for each sign-in method used by the user. We loop over this iterable using a `for` loop.
40
+
41
+
- In each iteration, we assign the `providerId` to our `signInMethod` string. The `providerId` can be 'google.com' for Google, 'facebook.com' for Facebook, and 'password' for email and password.
42
+
43
+
- After the loop is done, the function returns `signInMethod` string which indicates the sign-in method the user used.
44
+
45
+
- The function `getUserSignInMethod()` returns a String value which corresponds to the providerId of the user's sign-in method.
38
46
39
-
`user.providerData` is an iterable that provides UserInfo for each sign-in method used by the user. We loop over this iterable using a `for` loop.
40
-
41
-
In each iteration, we assign the `providerId` to our `signInMethod` string. The `providerId` can be 'google.com' for Google, 'facebook.com' for Facebook, and 'password' for email and password.
42
-
43
-
After the loop is done, the function returns `signInMethod` string which indicates the sign-in method the user used.
44
-
45
-
The function `getUserSignInMethod()` returns a String value which corresponds to the providerId of the user's sign-in method.
46
-
47
-
Here are examples of how the return value might look:
47
+
Here are examples of how the return value might look like:
48
48
49
49
- If the user has signed in using Google, the function will return: **`'google.com'`**
50
50
51
51
- If the user has signed in using Facebook, the function will return: **`'facebook.com'`**
52
52
53
53
- If the user has signed in using Email and Password, the function will return: **`'password'`**
54
54
55
-
These are the identifiers used by Firebase to represent different sign-in methods.
56
-
Please thoroughly test this function to ensure it fits your specific requirements
55
+
These are the identifiers used by Firebase to represent different sign-in methods. Please thoroughly test this function to ensure it fits your specific requirements
57
56
58
57
:::tip[Use Sign-In Method to Drive Dynamic UI in FlutterFlow]
59
58
In FlutterFlow, if you want to display or use the user's sign-in method in your UI logic (example, showing different UIs for Google vs. email login), you can create a custom function using the `providerId` approach shown in the article and **connect it to a custom action**. This allows you to make dynamic decisions inside your app based on how the user authenticated.
title: Deleting Firebase Users and Related Data in FlutterFlow
3
+
slug: /deleting-firebase-users-and-related-data
4
+
title: Deleting Firebase Users and Related Data
5
5
---
6
-
# Deleting Firebase Users and Related Data in FlutterFlow
6
+
# Deleting Firebase Users and Related Data
7
7
8
8

9
9
10
10
## Understanding the Delete Action
11
11
12
12
The delete action in Firebase is designed to remove the user from the authentication table only. This means the user's document in the database will not be affected. If you want to delete the user's document from the database as well, you'll need to create a custom action with some custom code.
13
13
14
-
## Logging Out After Deletion
14
+
###Logging Out After Deletion
15
15
16
16
After completing the delete action, it is important to log out the user. Since the user no longer exists in the authentication system, logging out ensures the app routes the user back to the login page, which is typically the initial page of your project.
Copy file name to clipboardExpand all lines: docs/troubleshooting/authentication/permission_denied_code_403.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,25 +17,27 @@ You may encounter this error due to one or more of the following reasons:
17
17
-**Missing or incorrect IAM roles** for the service account
18
18
-**API not enabled** in the Google Cloud project
19
19
20
+
20
21
Do the following to fix this error:
21
22
22
-
## Check Your Service Account JSON File
23
+
-**Check Your Service Account JSON File**
23
24
24
-
Ensure you are using the correct `service-account.json` file and that it is not corrupted or expired.
25
+
Ensure you are using the correct `service-account.json` file and that it is not corrupted or expired.
25
26
26
-
## Verify IAM Roles and Permissions
27
+
-**Verify IAM Roles and Permissions**
27
28
28
-
Make sure the service account has the necessary roles like `Editor`, `Owner`, or other specific roles required for your use case.
29
+
Make sure the service account has the necessary roles like `Editor`, `Owner`, or other specific roles required for your use case.
29
30
30
-
## Enable Required APIs
31
+
-**Enable Required APIs**
31
32
32
-
Go to the [Google Cloud Console](https://console.cloud.google.com/apis/library) and ensure all necessary APIs are enabled for your project.
33
+
Go to the [Google Cloud Console](https://console.cloud.google.com/apis/library) and ensure all necessary APIs are enabled for your project.
33
34
34
-
## Regenerate the Service Account Key if Needed
35
-
If you suspect the key is invalid, generate a new one and update your application configuration accordingly.
35
+
-**Regenerate the Service Account Key if Needed**
36
+
37
+
If you suspect the key is invalid, generate a new one and update your application configuration accordingly.
36
38
37
39
:::tip[Always Use Least Privilege Principle]
38
40
When assigning IAM roles to your service account, follow the **principle of least privilege**—only grant the minimum permissions necessary for the task. This not only reduces the risk of misconfiguration but also enhances the overall security posture of your app.
39
41
:::
40
42
41
-
If you continue to experience issues, consult the [Google Cloud IAM documentation](https://cloud.google.com/iam/docs/troubleshooting-access) or contact support for further assistance.
43
+
If you continue to experience issues, consult the [Google Cloud IAM documentation](https://cloud.google.com/iam/docs/troubleshooting-access) or contact [FlutterFlow Support](mailto:support@flutterflow.io) for further assistance.
Copy file name to clipboardExpand all lines: docs/troubleshooting/authentication/safetynet_phone_sign-in_issue_on_android_devices.md
+25-34Lines changed: 25 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,54 +38,45 @@ Ensure the following configurations are in place:
38
38
39
39
Firebase uses one of the following methods to confirm the authenticity of phone sign-in requests:
40
40
41
-
### 1. SafetyNet (Deprecated)
41
+
1.**SafetyNet (Deprecated)**
42
42
43
-
If the device supports Google Play Services, Firebase uses **SafetyNet Attestation** to confirm the device’s legitimacy.
43
+
If the device supports Google Play Services, Firebase uses **SafetyNet Attestation** to confirm the device’s legitimacy.
44
44
45
-
> :::warning[Deprecated API]
46
-
> The SafetyNet Attestation API is deprecated and has been replaced by the [Play Integrity API](https://developer.android.com/google/play/integrity).
47
-
> After **January 31, 2023**, you can no longer enable the SafetyNet API for new projects in the Google Cloud Console.
48
-
> :::
45
+
:::warning[Deprecated API]
46
+
The SafetyNet Attestation API is deprecated and has been replaced by the [Play Integrity API](https://developer.android.com/google/play/integrity). After **January 31, 2023**, you can no longer enable the SafetyNet API for new projects in the Google Cloud Console.
47
+
:::
49
48
50
-
####To use SafetyNet (if still active for your project):
51
-
- Enable **Android Device Verification (Deprecated)** in the [Google Cloud Console](https://console.cloud.google.com/).
52
-
- Ensure your app's **SHA-256** is added in the Firebase Console under **Project Settings > General > Your Apps**.
53
-
- Use the default Firebase API key or request onboarding for SafetyNet if needed.
54
-
- Monitor your quota [here](https://developer.android.com/google/play/safetynet/quotas).
49
+
To use SafetyNet (if still active for your project):
50
+
- Enable **Android Device Verification (Deprecated)** in the [Google Cloud Console](https://console.cloud.google.com/).
51
+
- Ensure your app's **SHA-256** is added in the Firebase Console under **Project Settings > General > Your Apps**.
52
+
- Use the default Firebase API key or request onboarding for SafetyNet if needed.
53
+
- Monitor your quota [here](https://developer.android.com/google/play/safetynet/quotas).
55
54
56
-

55
+

57
56
57
+
2.**reCAPTCHA Verification**
58
+
59
+
If SafetyNet is unavailable (e.g. device without Google Play Services or running on an emulator), Firebase falls back to **reCAPTCHA verification**.The reCAPTCHA challenge usually completes without user interaction. This flow requires:
58
60
59
-
### 2. reCAPTCHA Verification
61
+
- A valid **SHA-1** fingerprint added to your Firebase project.
62
+
- An **unrestricted** or **domain-allowlisted** API key (e.g. `your-project-name.firebaseapp.com`).
63
+
- Ensure both SafetyNet and reCAPTCHA flows are working to support a wider range of Android devices.
60
64
61
-
If SafetyNet is unavailable (e.g. device without Google Play Services or running on an emulator), Firebase falls back to **reCAPTCHA verification**.
62
65
63
-
- The reCAPTCHA challenge usually completes without user interaction.
64
-
- This flow requires:
65
-
- A valid **SHA-1** fingerprint added to your Firebase project.
66
-
- An **unrestricted** or **domain-allowlisted** API key (e.g. `your-project-name.firebaseapp.com`).
66
+
:::info[Release Mode Configuration]
67
+
When releasing your app to the Google Play Store, ensure you include the **SHA-1** and **SHA-256** keys from your **Play Console**. Here is how to do that:
67
68
68
-
> Ensure both SafetyNet and reCAPTCHA flows are working to support a wider range of Android devices.
69
+
- Navigate to **Play Console → Your App → Release → Setup → App Signing**
70
+
- Then copy both **SHA-1** and **SHA-256** fingerprints and add them to Firebase Console under **Project Settings > General > Your Apps**.
71
+
:::
69
72
73
+

70
74
71
-
## Important for Release Builds
72
-
73
-
> :::info[Release Mode Configuration]
74
-
> When releasing your app to the Google Play Store, ensure you include the **SHA-1** and **SHA-256** keys from your **Play Console**:
-[Using Firebase Auth in FlutterFlow](https://docs.flutterflow.io/authentication)
88
79
-[Play Integrity API Migration](https://developer.android.com/google/play/integrity)
89
-
80
+
:::
90
81
91
82
Still stuck? Check Firebase logs, test on a physical device, and ensure your API keys and fingerprints are correctly added. Proper configuration of SafetyNet or reCAPTCHA is critical to ensuring phone number sign-in works reliably across devices.
0 commit comments