Skip to main content
← Data, API & Backend
Data, API & Backend March 2, 2023 · 4 replies

Firebase : connect email/password to user data

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

Hello, during the creation of my application, I had some problems, especially with the use of Firebase as a backend. I wanted to find a solution to allow authentication but also to allow the user to give their nickname to display it each time the user authenticates. So I want to prevent other people from getting stuck on a problem like mine. la suite en commentaire👌

4 replies

Eliott March 2, 2023

Step 1: To allow the link and the exchange of data between your backend (Firebase) and Bravo Studio, you must use an API. You should probably know that there are several requests like POST or LIST, we will use a POST and here is the URL to put: https://firestore.googleapis.com/v1/projects/{PROJECT\_ID}/databases/{DATABASE\_ID}/documents/{COLLECTION\_NAME}/{DOCUMENT\_ID}
You will need to replace {PROJECT_ID}, {DATABASE_ID}, {COLLECTION_NAME} with the appropriate values ​​for your own project and collection and {DOCUMENT_ID} with ${user.id}. It is thanks to this that you will specify that the name of the document will be the UID of the connected user (this makes it possible to link the connection data to other data in a document of a collection). This request will create a document bearing the UID of the authenticated user.

Eliott March 2, 2023

step 2: Fill in a JSON code to ask the user what you want and this data will be transferred to the document. Here is a simple example to fill in the name:
{
  "fields": {
    "name": {
      "stringValue": "${name}"
    }
  }
}

Eliott March 2, 2023

Step 3: Enter test values. you must put (in my example) "name" followed by a value and "user.id" with a UID already present in your backend

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord