Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

create user properties firebase

everytime user is signing up, create a firestore doc about that user 

async function signUp(email, password) {
  // This function returns a credential which gives you the user's uid
  // which you could then use to create your document
  const credential = await createUserWithEmailAndPassword(auth, email, password);

  const uid = credential.user.uid

  // Create a new document using the uid as the document id
  // or however else you want to use this
  const ref = firebase.auth().collection("users").doc(uid)
  await ref.set({
    email,
    uid
  })
}

CODE BY "I'm Joe Too" from StackOverflow https://stackoverflow.com/questions/69547341/creating-a-document-every-time-someone-signs-up-in-firebase
Comment

PREVIOUS NEXT
Code Example
Typescript :: create custom user properties firebase 
Typescript :: ignor sonar 
Typescript :: typescript declare process.env 
Typescript :: how to check if key exists in json object c# 
Typescript :: ANGULAR: create component in module 
Typescript :: remove all comments function in c 
Typescript :: print all objects linked list python 
Typescript :: get n random elements from list java 
Typescript :: promise allsettled typescript 
Typescript :: path expo 
Typescript :: flutter swiper page indicator 
Typescript :: google sheets countif two conditions 
Typescript :: rails_env production rake assets precompile 
Typescript :: rite a script that prints “Hello, World”, followed by a new line to the standard output. 
Typescript :: c# check list of objects for value 
Typescript :: how to count digits in python 
Typescript :: how to install downloaded requirements pip with python 
Typescript :: the events calendar update the word event 
Typescript :: flutter web keep focus on textfield 
Typescript :: HeroService: getHeroes failed: Http failure response for http://localhost:4200/api/heroes: 404 Not Found 
Typescript :: typescript class extends 
Typescript :: linux copy all directory contents to another directory 
Typescript :: typescript splice 
Typescript :: Scripts cannot be executed on this system. 
Typescript :: array of objects in class c++ 
Typescript :: nest js http exceptions 
Typescript :: disadvantages of automation 
Typescript :: how to divide 1 dataframe into two based on elements of 1 column 
Typescript :: classes in ts 
Typescript :: how to compra vales on lists python 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =