How to remove captcha verification from Firebase phone auth using javascript?

本秂侑毒 提交于 2019-12-05 00:36:02

You can't remove captcha verification using default authentication.

Use anonymous authentication to avoid captcha letters to appear. Also anonymous authentication is more simpler than Firebase Authentication default authentication.

Usage:

firebase.auth().signInAnonymously().catch(function(error) {
  // Handle Errors here.
  var errorCode = error.code;
  var errorMessage = error.message;
  // ...
});

For details please follow this official documentation : https://firebase.google.com/docs/auth/web/anonymous-auth

I had the same problem while integrating iOS SDK.

If google has same architecture and classes of the firebase SDK across languages, this solution might work for you.

Auth.auth().settings?.isAppVerificationDisabledForTesting = true

use size: "normal" to size: "invisible"

 window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier(
    "recaptcha-container",
    {
      size: "invisible",
      callback: function(response) {
        submitPhoneNumberAuth();
      }
    }
  );
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!