Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
Firebase database user info

I’m trying to make a website where a user can login with a username a password and a name

This function is not implemented in firebase authentication option so I tried using its real-time database Here is my code so far:

export function signup(email, password, name) {
  return auth().createUserWithEmailAndPassword(email, password).then((userCredential) => {
      db.ref("users").ref(userCredential.uid).push({
      name: name
    });
  })
}

Saving the data does not work but I think I have a good start.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try passing only one ref() call and set() instead of push():

export function signup(email, password, name) {
  return auth().createUserWithEmailAndPassword(email, password).then((userCredential) => {
    db.ref("users/" + userCredential.user.uid).set({
      name: name
    });
  })
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!