Firebase Auth, Firestore & Storage (plugin)
  • 🚀Getting Started
  • Setup
    • Create a Firebase Project
    • Get Firebase access credentials
    • Offline Support
    • Secure your credentials and data
      • Restrict your api-key to your domain
      • Security Rules on Firebase
  • Plugin Elements
    • 🛠️About elements
    • 💾Data Schemas
    • Firebase Auth (Current User)
    • Firestore Data List
      • Firebase Geohash
      • Firestore Data (legacy)
    • Firestore Data Extractor
    • Firestore Data Single
    • Firestore Data Aggregation
    • Firestore Data Processor
    • Firebase Storage Upload Button
    • Firebase Action Listener
    • Firebase Dropdown Processor
  • Plugin Front-end Actions
    • 💻About front-end actions
    • 💾Field types table
    • Firestore
      • Create a new document
      • Update a document
      • Delete a document
      • Update a list of documents
      • Delete a list of documents
      • Batch Operations
        • Batch Operation Constructor
        • Batch Operation Commit
    • Firebase Auth
      • Sign the User Up
      • Log the User In
      • Log the User In with Google
      • Log the User In with Facebook
      • Log the User In with GitHub
      • Log the User Out
      • Update User's Profile
      • Update User's Password
      • Update User's Email
      • Send password reset email
        • Handle reset password code
      • Send verification email
        • Handle verify email code
      • Delete current user
    • Firebase Storage
      • Upload file base64
      • Delete uploaded file
  • Plugin Back-end Actions
    • ☁️About backend actions
    • Firestore Backend
      • Get a list of documents
      • Get a single document
      • Count a list of documents
      • Create a new document
      • Update a document
      • Delete a document
      • Update a list of documents
      • Delete a list of documents
    • Firebase Auth Backend
      • Create an account for someone else
      • Update another user's profile info
      • Delete a user account
      • Generate email confirmation link
      • Generate password reset link
      • Set user roles
Powered by GitBook
On this page
  • The plugin elements
  • ⚠️Tip: Wait until all your inputs are ready before making the element visible
  1. Plugin Elements

About elements

PreviousSecurity Rules on FirebaseNextData Schemas

Last updated 11 months ago

The plugin firebase and firestore elements are bunches of code that get added to the page when you position them on it. The elements will be invisible to the user, but keep in mind they can mess with your UI. To avoid it, you can set the width and height to 0px.

The actions performed by the elements are run when they are loaded to the page, so you can control when they run the first type using the visibility settings.

Each element stores a various states that will contain your data and allow for a variety of filters and settings to best suit your need.

The plugin elements

Element
Description

Get information on the current user authenticated using the Firebase Authentication service.

Performs a query to get a list of documents from a Firestore collection.

Convert latitude and longitude into a geohash for you to store on a document. This is required to perform geoqueries, in which you sort data from geolocation.

A JSON reader, that helps you to get data from fields on document data returned by queries.

Performs a query to get a single document from a Firestore collection.

Performs an aggregation query (count, sum or average) in a Firestore collection.

Gets a list of documents or an array of JSONs and allows to filter and sort them on the front-end, without making new queries to Firestore.

Allows to upload files to Firebase Storage.

Helps to display entire documents on Bubble's Dropdown elements, by choosing which field to display.

⚠️Tip: Wait until all your inputs are ready before making the element visible

Keep in mind that, because the query operations run on the front-end, Bubble sometimes messes with the order in which data arrives from Firestore. That means you must account that factor while using results of other Firebase elements as input data in other query elements.

For instance, if you want to get documents form the "tasks" collection where the "owner" filter equals the current user's document reference, you can use the filter bellow (owner == users/Firebase Auth's User ID).

But if the User ID is not yet available, the query will fail due to security rules on Firestore.

To work around that, you can put a visibility conditional on the Firestore Data element, for it to show only when the User ID is not empty. As the query will only occur when the element is "visible" on the page, it will wait for when the User ID is available to run the query, avoiding the error.

Keep that in mind when fetching data from Firestore.

🛠️
Firebase Auth (Current User)
Firestore Data List
Firebase Geohash
Firestore Data Extractor
Firestore Data Single
Firestore Data Aggregation
Firestore Data Processor
Firebase Storage Upload Button
Firebase Dropdown Processor