7) Master Project: Firebase + User Authentication Flashcards

1
Q

what are the 3 parts of the backend with respects to this project?

A

authentication

servers

database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

explain the relationship between a server and a databse?

A

server stores the code that determines the most efficient way to request data from the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where does the firebase config code go?

A

src/firebase/firebase.utils.js

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Where in the code does the user information get added so that the entire application has access to it?

A

App.js which should be a class function because we need to store the current user in the state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the inputs for the firebase file?

A

inputs:

  • firebase/app
  • firebase/firestore
  • firebase/auth
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how do you apply firebases signout functionality to a sign out button

A

onClick={() => auth.signOut()}>

SIGN OUT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is the firebase database data organized?

A

into collections and documents that can also reference other collections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

database documents need to have this attribute.

A

a unique ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is it mean for something the be a noSQL database?

A

the database consists of one big JSON object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SYNTAX for quering data from the fire store

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a query?

A

a request we make to firestore to give us something from the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Firestore returns us two types of object: ___ and ___. Of these objects, they can be either ___ or ___ versions.

A

references and snapshots

Document or Collection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does a queryReference object represent?

A

the “current” place in the database that we are querying.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

We use ___ to perform our CRUD methods (create, retrieve, update, delete).

A

documentRef

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

List the CRUD methods

A

.set()

.get()

.update()

.delete()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you add documents to collections using the collectionRef object?

A

collectionRef.add({//value:prop})

17
Q

we get the snapshotObject from the referenceObject using the __ method.

A

.get()

18
Q

documentRef returns a __ object

A

documentSnapshot

19
Q

collectionRef returns a ___ object

A

querySnapshot

20
Q

what attribute of a documentSnapshot object tells us whether a document is in the database?

A

exists; can be true or false

21
Q

We get documentSnapshot objects from our ___ object

A

documentReference

22
Q

The documentSnapshot object allows us to check if a document exists at this query using the ___ property which returns ___.

A

.exists

boolean

23
Q

We can get the actual properties on a documentSnapshot object by calling the ____ method, which returns us a …

A

.data()

JSON object of the document

24
Q

how do you prevent suggestions for email from popping up when you select sign-in with google?

A

add type=”button” attribute to the sign in with google component.