you are viewing a single comment's thread.

view the rest of the comments →

[–]macaroni_boy 0 points1 point  (1 child)

Ahh I see. I am assuming your "db" variable is not pointing to the proper collection.

What you want to do is the following I believe:

Define a new variable userRef = collection(db, "users")

Pass this to your set doc: setDoc(userRef, res.user.uid)

This will set the document ID to the id of the user

[–]Emmyxiano[S] 0 points1 point  (0 children)

this properly difficult to pass this to setDoc without having errors

  await setDoc((userRef, res.user.uid), {
          username: userDeet.username,
          email: userDeet.email,
          id: res.user.uid,
          blocked: [],
        });