How to integration to Firebase Auth

Hey team, I’m switching from Supabase to Firebase and I’d like to understand what’s your suggestion on how to integrate WeWeb with Firebase authentication.

I’d like to replace operations like create user, reset password, etc…

Should I use the external Firebase JS library? Is there a WeWeb official plugin I don’t know about?

Hello, there is no external plugins yet, as it’s not possible to make any (yet). Your best bet is importing the SDK from a CDN and set up reusable workflows. It’s doable, but I’m not sure if I’d do it (yet).

Edit: I actually tested out the Firestore and it seems like it is 100% doable in WeWeb.

Interesting… How did you setup firestore?

I’m trying to setup firebase auth, but I’m getting an error when importing the @firebase/auth lib from unpkg.


It looks like this package is not meant to be used like this.

Actually no, I went and imported all the scripts from the CDN as they suggest in their Docs with the “modular” approach.

So you followed this documentation? Alternative ways to add Firebase to your JavaScript project

Exactly :slight_smile:

Did you add the CDN importing to the Custom Code section of weweb and then published the project? Do you know if there is a way of importing this without publishing a project?

You can import it by using https://weweb-embed.statechange.ai/
Tomorrow, or Thursday I’ll try to put out a blog with code snippets about how to achieve this.

1 Like

Hey @daniel.oliveiravas as promised, here is the article, I’m sending it here for you “early” as I just finished writing it and I’ll go through it and probably tweak it a little. The information is there though.

2 Likes

Amazing! Thanks for sharing how to do this. I’ll test on my project later today.