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

289
Views
createUser no funciona en Firebase/Auth + Next.js

Estoy trabajando en la autenticación de correo electrónico y contraseña en Firebase Auth + Next js. Pero esta vez me gustaría usar un uid dedicado para la autenticación. Así que creo que debería usar createUser mejor que createUserWithEmailAndPassword . Sin embargo, el error ocurre como a continuación:

La propiedad 'createUser' no existe en el tipo 'Auth'.

 import { getAuth, createUserWithEmailAndPassword } from 'firebase/auth' const auth = getAuth() const newId = XXXXXXXXXXXXXx getAuth() .createUser({ uid: newId, email: data.email, password: data.password, }) .then((userRecord) => { // See the UserRecord reference doc for the contents of userRecord. console.log('Successfully created new user:', userRecord.uid); }) .catch((error) => { console.log('Error creating new user:', error); }); // It works createUserWithEmailAndPassword(auth, data.email, data.password)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Para crear un usuario, debe usar createUser -admin SDK .

Con node.js , instálelo con npm install firebase-admin . Después:

 const admin = require("firebase-admin"); const newId = XXXXXXXXXXXXXx; admin.auth().createUser({ uid: newId, email: data.email, password: data.password, }) .then(function(userRecord) { // See the UserRecord reference doc for the contents of userRecord. console.log("Successfully created new user:", userRecord.uid); }) .catch(function(error) { console.log("Error creating new user:", error); });

Consulte la referencia de usuario de Admin SKD para obtener más información .

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!