rules

API Versioning Trick for Firebase

Many people make the mistake of thinking that Firebase is simply a way to sync data between devices. Without digging any deeper, you might think it's a bit of a one-trick pony. Anyone that's ever seen a demonstration of Firebase, will know that Firebase is way more than this. Firebase…

Firebase Security Rules Proposal : Restricted IP Addresses

If you're using backend processors with Firebase, you probably know not to be authenticating the server with your Firebase secret. Instead you should be using custom tokens. Many people, ahem, use custom tokens with an "admin" : true flag in the payload. With the admin flag, Firebase ignores all security rules…

Combining Firebase Rules for My Sanity

I've been working on replacing the Kids In Touch API with Firebase. I've struggled a bit with the rules system. It's pretty complicated putting the rules for an entire API in a single, understandable file. To help with this, Firebase has released their new Blaze compiler. It seems pretty awesome…

Firebase Validation hasChildren() Pro Tip

So, I'm chugging along with testing data validation in Firebase. Everything was going okay with my tests. I could block invalid data and accept valid data. tl;dr : If you use .hasChildren() validation, you must include a validation rule for every property you are requiring. Original Rules: { "rules": { ".write": false…