Skip to content

Instantly share code, notes, and snippets.

@skolhustick
Created July 27, 2019 14:33
Show Gist options
  • Save skolhustick/600018562c2a9a100db1489c264dd7f2 to your computer and use it in GitHub Desktop.
Save skolhustick/600018562c2a9a100db1489c264dd7f2 to your computer and use it in GitHub Desktop.
// 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