Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

228
Visualizações
How to implement google MFA with ReCaptchav3

As per docs https://cloud.google.com/identity-platform/docs/web/mfa we have an example for reCaptchav2 but how to implement MFA with reCaptchaV3 cause we have to pass the verifier in some functions like verifyPhoneNumber() but as far as I know, reCaptchav3 does not return a verifier.

For example Here,

var recaptchaVerifier = new firebase.auth.RecaptchaVerifier('sign-in-button', {
 'size': 'invisible',
 'callback': function(response) {
   // reCAPTCHA solved, you can proceed with phoneAuthProvider.verifyPhoneNumber(...).
   onSolvedRecaptcha();
 }
});

for RecaptchaVerifier method it returns a recaptchaVerifier which we need to pass to the verifyPhoneNumber() method as an second argument.

var phoneAuthProvider = new firebase.auth.PhoneAuthProvider();
// Send SMS verification code.
return phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, recaptchaVerifier)
  .then(function(verificationId) {
    // verificationId will be needed for enrollment completion.
  })

but here in the Recaptcha v3 render method it returns a widgetId which I cannot pass into the verifyPhoneNumber() method.

recaptchaWidgetId = grecaptcha.render('recaptcha-container', {
    sitekey: 'abcdefghijklmnopqrstuvwxy-1234567890abcd',
    callback: function (response) {
      console.log('response', response)
      resolver(response)
    },
  })

So my question was is there any way to get the reference of recaptchaVerifier from RecapchaV3 so that I can pass it to the verifyPhoneNumber() method. Or Is there any other way of implementing this?

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda