DEV Community

Cover image for A Quick Dive Into Firebae (Firebase)

A Quick Dive Into Firebae (Firebase)

Pato on November 15, 2019

Firebase? More like FireBAE. I ❤️ Firebase! (Just in case it wasn't clear.) What is Firebase? A lot of you have heard of Firebase. Firebase is...
Collapse
 
dbredvick profile image
drew.tech

I'm using Firebase right now on quickerquestions.com, but I've run into many problems. Have you had any success implementing a complex security policy for Firestore that does authorization well?

Collapse
 
dbanisimov profile image
Denis Anisimov

Basically you have two options to implement complex authorizations while staying within Firebase serverless realm:

1) Use callable/HTTPS Cloud Functions to write data to your database and do all checks there + forbid any client writes using Security Rules
2) Optimistically allow client writes with minimal checks using Security Rules + validate and correct data using background triggered Cloud Functions.

There is a good post about these patterns: Patterns for security with Firebase: combine rules with Cloud Functions for more flexibility

Collapse
 
seanmclem profile image
Seanmclem

Yes, when pairing with another nodejs

dev.to/emeka/securing-your-express...

Collapse
 
dbredvick profile image
drew.tech

Thanks! I'm building with node right now so this is perfect.

Thread Thread
 
seanmclem profile image
Seanmclem

Yeah I'm in the middle of building an implementation based off this article. It's really working out

Collapse
 
saadnoorsalehin profile image
saadnoor salehin

Firebase is a bottleneck when it comes to complex queries. Full-text search isn't possible in Firestore. I think it is better for prototyping, but for a scalable production app, it needs to become more mature.

Collapse
 
devpato profile image
Pato

You definitely have a point, you can incorporate full text search using a third party product like algolia + firestore

Collapse
 
andrekelvin profile image
AndreKelvin

I'm currently using firebase MLKit for my text Detector app which is extremely easy to implement.

Collapse
 
iaboelsuod profile image
Ibrahim Zahema

More people need to get on board with Firebase!

Collapse
 
oleksandr profile image
Oleksandr

At last, I found clear explanations of Firebase, thanks!
But still not clear Firebase vs Firestore diff

Collapse
 
devpato profile image
Pato

I'm on my phone rn but I'll get back to you tomorrow. I just saw this idk why lol my bad

Collapse
 
rubensdemelo profile image
rubensdemelo

"As of January 2020, the Flame billing plan ($25/mo of additional quota) is no longer available for new sign-ups."

firebase.google.com/support/faq#fl...

Collapse
 
devpato profile image
Pato

Correct, that's why I mentioned in the article "Flame Plan ($25 a month) (Not applicable anymore)" it was a good option for playing around :(