Firebase

In this section you’ll find articles about Firebase in general that don’t rely on any framework or front-end technology. Things like new feature announcements, how to work with their dashboard, etc.

Do you need to hide your Firebase API keys for Ionic apps?
Tools used:
Backend: Firebase -- Version: Evergreen

About 3 or 4 times a month someone asks this questions, they are worried that since Ionic apps are client-side code (HTML, CSS, JS), someone can see their Firebase credentials and mess with their data. I understand why this is a concern. People want to keep their data private (ALL OF IT!). But there’s one thing we need to know about Firebase API keys. The fact that someone knows your apiKey is not a security risk alone (more on that later). ... Read More

How to handle multiple firebase projects from the same Ionic app
Tools used:
Backend: Firebase -- Version: Evergreen
Frontend: @ionic/angular -- Version: Evergreen

Do you have a separate environment for development, production, QA? Or do you test everything on the same Firebase application? For the longest time, I used one project for everything, but then, it got traction, couple hundred people started using it, and every time something crashed because of my testing I got several emails asking what was going on. At that point, I understood that I needed to separate things. ... Read More

Learn how to install Firebase Extensions on your project
Tools used:
Backend: Firebase Cloud Functions -- Version: Evergreen

At the last Firebase Developer Summit, the Firebase team announced several new features. One that you’ll enjoy a lot is Firebase Extensions. Their website defines them as: Designed to increase productivity, Firebase Extensions provide extended functionality to your apps without the need to research, write, or debug code on your own. This just means that they noticed some functionality most of their users were implementing on their own and decided to implement it for you, so you can just click install and run it in your app. ... Read More

Use Firebase Cloud Functions to fetch an image and transform it to base64
Tools used:
Backend: Firebase Cloud Functions -- Version: 3.1.0

Have you done image manipulation on a server? That was one requirement I had a while back that I didn’t know how to solve at the moment. We were working with jsPDF to create report PDFs in one of our Ionic apps, but we had an issue, all of our images where stored online, and you can’t pass a url to jsPDF for images. It only takes base64, data URI, and I think the blob object. ... Read More