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

121
Views
How to set username in Firebase auth

Hello how can I set username on Signup for Firebase User. I use firebase Authentication API. I thought about try / catch block and setting User properties like

const user = auth.currentUser;
user.name = 'John123'

Is it possible?

const onSubmitHandler = (e: React.FormEvent<HTMLFormElement>) => {
        e.preventDefault()
        createUserWithEmailAndPassword(auth, email, password)
        
        
    }
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Firebase Authentication has a display name for each user, which can be whatever you want it to be. To set it, call updateProfile as shown in the documentation on updating the user's profile:

await createUserWithEmailAndPassword(auth, email, password);
updateProfile(auth.currentUser, {
  displayName: "John123"
})
about 4 years ago · Juan Pablo Isaza Report

0

It is full solution

 const onSubmitHandler = (e: React.FormEvent<HTMLFormElement>) => {
        e.preventDefault()
        const createUser = async ( ) => {
            await createUserWithEmailAndPassword(auth, email, password)
            updateProfile(auth.currentUser!, {
            displayName: "John123" // it can be a value of an input
          })
        }
        createUser()
    }
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!