Skip to content

Instantly share code, notes, and snippets.

@skolhustick
Last active July 27, 2019 14:33
Show Gist options
  • Save skolhustick/acacf7e8e0f82ddd99030118843394bb to your computer and use it in GitHub Desktop.
Save skolhustick/acacf7e8e0f82ddd99030118843394bb to your computer and use it in GitHub Desktop.
firebase-phone-no-auth-2.js
// Create a Recaptcha verifier instance globally
// Calls submitPhoneNumberAuth() when the captcha is verified
window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier(
"recaptcha-container",
{
size: "normal",
callback: function(response) {
submitPhoneNumberAuth();
}
}
);
// IF you want to hide the recaptcha, use 'invisible' the size
// window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier(
// "sign-in-button",
// {
// size: "invisible",
// callback: function(response) {
// submitPhoneNumberAuth();
// }
// }
// );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment