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

149
Views
¿Cómo volver a autorizar a un usuario en Firebase?

Ambiente

  • Firebase JavaScript SDK v8

Pregunta

¿Cómo puedo volver a autorizar a un usuario que ya inició sesión con su contraseña? Lo que quiero hacer es como a continuación:

 const password = "some-password" firebase.reAuthorizeUser(password) .then(() => console.log("ok")) .catch(() => console.log("ng"))

Gracias de antemano.

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

0

Está buscando el método reauthenticateWithCredential .

 const user = firebase.auth().currentUser; // TODO(you): prompt the user to re-provide their sign-in credentials const credential = promptForCredentials(); user.reauthenticateWithCredential(credential).then(() => { // User re-authenticated. }).catch((error) => { // An error ocurred // ... });

Checkout vuelve a autenticar a un usuario en la documentación.

about 4 years ago · Juan Pablo Isaza Report

0

SDK v9

 import {getAuth, reauthenticateWithCredential, EmailAuthProvider} from "firebase/auth"; const reauthenticate = async () => { try { const auth = getAuth(); const user = auth.currentUser; const credential = await EmailAuthProvider.credential( email, password ); await reauthenticateWithCredential(user, credential); return true } catch (e) { return null } }
about 4 years ago · Juan Pablo Isaza Report

0

const credencial = promptForCredentials();

esto me esta dando error

no puedo encontrar la variable: promptForCredentials.

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!