2. About Me – Kristin Ferrier
18+ Years in IT
Principal Consultant at Ferrier Solutions
Full stack web developer with specialty and passion for data
Twitter: @SQLEnergy
Techlahoma Slack: @EnergyDev
GitHub: @EnergyDev
3. What we’ll cover
Two ways Firebase can help with you build your applications faster
Firebase Realtime Database
Firebase Authentication
4. Firebase Realtime Database and Authentication helping you
build apps faster
Firebase Realtime
Database
Authentication & Data
Android is a trademark of Google LLC.
iOS App
Android
™ App
React
Web
App
5. Firebase Realtime Database
Database as a Service (DBaaS) offered by Google
NoSQL, document database that stores data as JSON objects
7. Data manipulation via JavaScript apps
import database from "../firebase/firebase";
return database.ref(`users/${uid}/expenses`).push(expense).then((ref) => {
dispatch(addExpense({
id: ref.key,
...expense
}));
})
In JavaScript web applications, data is manipulated using JavaScript
The below code is adding an expense to the Firebase realtime database and then adding it to the
Redux store
8. Validation and Security
What if someone tries to bypass my front-end application,
how are validation and security handled?
Database Security Rules within Firebase
9. Lockdown users to just their data
Lock users down to
just read/write
their data
This is done within
Firebase, so
security is there
even if your front-
end GUI is
bypassed
Please, see official Firebase documentation for the latest in security rule logic.
10. Data Structure Validation
Lock down
structure of data
saved
This is done within
Firebase, so
validation is there
even if your front-
end GUI is
bypassed
Please, see official Firebase documentation for the latest in security rule logic.
11. Setup Security !!!!!!!!!!!!!
Be sure to setup security
The DEFAULT is Read/Write for EVERYONE!
Even if they don’t have your database keys, your database can be read
12. Firebase Authentication
Provide authentication in your apps using any of the below platforms:
Email/Password
Phone
Google
Play Games
Facebook
Twitter
Github
Anonymous
14. Here’s the login JS (Google auth)
import { firebase, googleAuthProvider } from "../firebase/firebase";
export const startLogin = () => {
return () => {
return firebase.auth().signInWithPopup(googleAuthProvider);
};
};
The Login with Google button calls the startLogin function above
15. Firebase authentication
Can integrate with Firebase Realtime Database
You can use it as a stand alone Firebase feature, as well
16. Awareness Items
Make sure you understand the pricing plans. Firebase typically has a free plan with
caps, but it may not be the default.
The free plan may not have automated backups
Firebase Realtime Database does not handle arrays
You can still use arrays in your web app, though