Delete User

Using this action, you can delete the user account created using the Firebase authentication. Additionally, you can also set up to delete all data associated with that user.

Prerequisites

Before you add this action, make sure you have added the Firebase Authentication and have some user accounts created.

Adding Delete User action

Follow the steps below to add this action to any widget.

  1. Select the Widget (e.g., Container, Button, etc.) on which you want to add the action.

  2. Select Actions from the properties panel (the right menu), If it's the first action, click + Add Action button. Otherwise, click the "+" button below the previous action tile (inside Action Flow Editor) and select Add Action.

  3. Search and select the Delete User (under Backend/Database > Firebase Authentication) action.

  4. As a best practice, it's also recommended to log out the user (using the logout action) followed by this action.

  5. To delete all records and data associated with that user's account:

    1. Navigate to the Firestore (from the Navigation Menu) > switch to Firestore Settings > Firestore Rules.

    2. Identify the collection from which you want to delete the user's data and ensure the Delete rule is set to Tagged Users. This will open the 'Tag Users' popup; here you can select the field that contains the document reference. See how to setup a rule.

    3. See the Delete User References section and click on Preview to verify the generated rule.

    4. Click the Deploy button.

FAQs

I can't see or select field in 'Tag Users' popup

If you can't see or select the field containing the user reference, ensure that you have enabled the 'Create User Document' option in the Create Account action. Enabling this option ensures that the 'users' collection is properly set up and its reference can be accessed in the 'Tag Users' popup.

Last updated