7) Master Project: Firebase + User Authentication Flashcards
what are the 3 parts of the backend with respects to this project?
authentication
servers
database
explain the relationship between a server and a databse?
server stores the code that determines the most efficient way to request data from the database.
Where does the firebase config code go?
src/firebase/firebase.utils.js
Where in the code does the user information get added so that the entire application has access to it?
App.js which should be a class function because we need to store the current user in the state
What are the inputs for the firebase file?
inputs:
- firebase/app
- firebase/firestore
- firebase/auth
how do you apply firebases signout functionality to a sign out button
onClick={() => auth.signOut()}>
SIGN OUT
How is the firebase database data organized?
into collections and documents that can also reference other collections
database documents need to have this attribute.
a unique ID
What is it mean for something the be a noSQL database?
the database consists of one big JSON object
SYNTAX for quering data from the fire store
What is a query?
a request we make to firestore to give us something from the database
Firestore returns us two types of object: ___ and ___. Of these objects, they can be either ___ or ___ versions.
references and snapshots
Document or Collection
What does a queryReference object represent?
the “current” place in the database that we are querying.
We use ___ to perform our CRUD methods (create, retrieve, update, delete).
documentRef
List the CRUD methods
.set()
.get()
.update()
.delete()