Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

create custom 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 :: google sheets mode text 
Typescript :: deep partial typescript 
Typescript :: puts ruby example 
Typescript :: defining component layout next ts 
Typescript :: how to add an element to a Typescript array 
Typescript :: what are the common mistakes in software development 
Typescript :: why in angular template i cant use Object.Keys() 
Typescript :: get random light color 
Typescript :: Array.prototype.map() expects a return value from arrow function array-callback-return react 
Typescript :: absolute path expo 
Typescript :: typescript returntype remove promise 
Typescript :: select constraints in sql 
Typescript :: typescript extend type 
Typescript :: typescript check if object is of type 
Typescript :: call function dynamically typescript 
Typescript :: cannot redeclare block-scoped variable typescript 
Typescript :: the android gradle plugin supports only kotlin gradle plugin version 1.3.10 and higher 
Typescript :: ordenar por fecha arreglo de objetos typescript 
Typescript :: createasyncthunk with typescript 
Typescript :: inno add exe in service 
Typescript :: check type of object typescript 
Typescript :: build with tsconfig-paths 
Typescript :: prototype design pattern typescript 
Typescript :: ts date get minutes 
Typescript :: typescript string 
Typescript :: loop trhough list of lists in python and find single elements 
Typescript :: c# to typescript 
Typescript :: onblur vs valuechange 
Typescript :: servlets meaning 
Typescript :: ncbi datasets command-line tool 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =