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

381
Views
No capturado (en promesa) FirebaseError: Firebase: Error (auth/missing-code)

Intentando implementar firebase 2fa de Fireship en firebase v9

 const verifyOTP = async () => { const code = otpRef.current.value if (code.length >= 6) { const cred = await new PhoneAuthCredential({ verificationId: window.verificationId, smsCode: code }) const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(cred) await multiFactor(user).enroll(multiFactorAssertion, phoneNumber) alert('opted-in to 2FA') } }

no le gusta esta línea:

 await multiFactor(user).enroll(multiFactorAssertion, phoneNumber)

porque piensa que falta el smsCode, aunque claramente está allí. Obtuve el mismo error por faltar el ID de verificación, pero al ponerlo en un objeto JSON y convertirlo en la clave, se solucionó y, sin embargo, sigo recibiendo el error (auth/missing-code).

 assert.ts:122 Uncaught (in promise) FirebaseError: Firebase: Error (auth/missing-code). at createErrorInternal (assert.ts:122:1) at _fail (assert.ts:65:1) at _performFetchWithErrorHandling (index.ts:170:1) at async _logoutIfInvalidated (invalidation.ts:32:1) at async MultiFactorUserImpl.enroll (mfa_user.ts:61:1) at async verifyOTP (OptIn2FA.js:101:1)
about 4 years ago · Juan Pablo Isaza
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!