Callback is not being fired using invisible reCaptcha for phone number authentication.
Click on the submit button and you'll notice that the callback is not being fired with the console statement.
import React from 'react';
import firebase from 'firebase/app';
import 'firebase/auth';
const firebaseConfig = {
apiKey: 'xxx',
authDomain: 'xxx',
databaseURL: 'xxx',
projectId: 'xxx',
storageBucket: 'xxx',
messagingSenderId: 'xxx',
appId: 'xxx',
measurementId: 'xxx',
};
firebase.initializeApp(firebaseConfig);
function App() {
const handleSubmit = event => {
event.preventDefault();
window.reCaptchaVerifier = new firebase.auth.RecaptchaVerifier('sign-in-button', {
size: 'invisible',
callback: function (response) {
// callback is not being fired
console.log(''I am not being logged in console);
},
});
};
return (
<form onSubmit={handleSubmit}>
<input />
<button id="sign-in-button">Submit</button>
</form>
);
}
export default App;
Internal tracking bug: b/160175350
Internal tracking bug: b/160175350
Hi @scottcrossen were you able to reproduce this issue?
Hi,
Has there been any progress on this issue so far?
@99diagha don't think so.
At the end add:
window.reCaptchaVerifier.render()
Most helpful comment
@99diagha don't think so.