[new plugin] Firebase Auth & Firestore

Hello bubblers,

I just created my first paid plugin for bubble, after a lot of programming effort in the last few months. It is a plugin that helps to connect and use the Google Cloud database, Firestore, and also helps to use Firebase user authentication. (the goal is to add more functionalities to interact with Firebase in the future, like storage, for instance).

Benefits of using the plugin:

  • Save Workload Units: since interactions can be done via front-end, without going through the bubble server functions, you can save WU usage and avoid growing your infrastructure cost on Bubble
  • More freedom for you database: by using a database outside of bubble, besides having more performance in some cases, it also makes it easier to use your database with other platforms, if you wish to do so. For example, you can make a mobile app for your site in FlutterFlow, taking advantage of it’s fine integration with Firebase, without having to worry about configuring da Bubble API.

Here is a YouTube playlist showing how to use and setup the plugin: https://www.youtube.com/playlist?list=PLd9TaiNhZPafmnREi9brd3AGrzU1Kmicz

If anyone has any suggestions or questions, feel free to post it here or email us at support@estare.com.br

4 Likes

Thanks for making this! I get the insufficient permissions error in console. I’ve followed all the steps in your youtube videos…

By this plugin, we can upload data only to store

Or
We can create database structure inside firebase then link it with bubble by your plugin?

Hey @rohanjainneri , this error will depend of the security rules you set on Firestore and the privacy filters you’re using on the plugin. Please, feel free to send me an email on support@estare.com.br with more details on your rules and setting so I can better help you on your specify case. :slightly_smiling_face:

I’m not sure I got the question, but the plugin allows you to connect your bubble app to Firestore, which means you’ll be able to create, update, delete and read data from Firestore from your bubble app. We plan to allow uploads and reads to Cloud Storage too, in the future.
You can see how the plugin work through the YouTube tutorial linked in this topic.

If I need to activate notifications on the Bubble-created mobile app, that’s fine.

Like:
After using a mobile app, the user clicks the like button and a notification is sent to another user on their mobile device (Android/iOS). Could a plugin assist with this?

Do you mean push notifications? That is one of the services provides by firesbase on FCM (Firebase Cloud Messaging), but it’s not supported by our plugin yet, but there are plans to add this feature, as well as firebase cloud storage for files and images.

I’m trying to handle authentication on firebase with the plugin and I want to use the action listener to catch errors that popup during authentication.

I have added the Firebase action listener and given it an ID of error.

My confusion is on how I should set it up in the workflow. Should it be option 1 or option 2?

option1::

Or option2::
Screenshot 2024-03-01 183643

And furthermore, I am using subsequent conditions of looking for any error message in the action listener. If it is empty, do the success workflow, if there’s some error message, do the error workflows. Is this implementation ideal?


Hello @Panto9 .
In terms of how to write the trigger ID, “option 2” is the correct one. Than you’ll be able to choose from the various triggers provided by the Action Listener element. These triggers are workflows trigger, like, for instance:
image

The above workflow will run if an error occurs in any action linked to this Action Listener through it’s ID.

So you can have more than one trigger linked to the same Action Listener. If you give a listener an ID of “user sign up listener”, for instance, using this same ID on the “Sign the User Up” action, if the sign up fails, the listener will trigger and error event:
image

Now, if the sign up is successful, it will trigger a “user signed up” event:
image

1 Like

Thanks. I actually used a workaround where I use the FirebaseAuth Current User. But I will revert to action listener as current user doesn’t cover all use cases.

Hi,
How do I crosscheck the verification link? What I mean is in the verification link sent using Firestore, there’s URL parameters like mode and oobCode. How exactly do I know the oobCode is not forged, as for example I want to update the user’s loginVerified field if that oobCode is correct or something.

I’ve completed the section on the plugin’s documentation to help you with the “email verification” and “password reset” features. :slightly_smiling_face: => https://estare.gitbook.io/firebase-auth-firestore-storage-plugin/plugin-front-end-actions/firebase-auth/send-password-reset-email

1 Like

You’re a gem Augusto.

I actually figured it out, but thanks for this. Your plugin has helped immensely so far. Because of your plugin I can rest easy and use Bubble instead of moving the entire app to another platform.

1 Like

Hi,

There’s no mention of how to handle oobCode for validation. If I send a password reset link, or email verification link, how sure am I the oobCode in the URL is not expired or is the right one?

This verification is handled by Firebase itself. If the code is expired, the “Handle reset password code” action will return an error.

1 Like

This does not seem to be working. It keeps throwing up the error that is is unsupported or something.


Also how can I update the user profile is the “Handle email verification code” does not return an error. I cannot find any action relating to that.

I also noticed that for lots of the boolean fields, they evaluate to their opposite eveytime. So if I set an action to run if field1 is true, said action will rather run if field1 is false. I have tried it severally with the same results.

The logged in and logged out events on the firebase auth element have a known issue that’s difficult to handle, that they trigger the action before the data in the “field” states is ready. This may lead to boolean fields being evaluated as false because they’re empty.
To avoid this, you can use the “Data ready or changed” trigger of the Firebase Auth element instead. This trigger is present in all the elements that bring data from Firestore.
image

About the error message on the handle verify email, I’m not sure what it might be. Just to double check, you’re using the “send verification email” action and not the “password reset” one by mistake, right? Since they have similar names I sometimes select the wrong one.

Yes, I am using the handle verification email action, not the password reset action I had to double check to make sure; when I was getting the error

Shouldn’t these be opposites?


Correct. I just fixed. Thanks for pointing it out.