I found a couple of solutions, but they were not very effective. For example, one solution involved using HTML and JS through a web viewer, but there were issues with signing up and the Captcha kept appearing repeatedly.
Another solution involved using an API and assuming that the phone number was already verified. However, this may not be a feasible option for everyone.
It would be helpful if there were an update to include this method in MIT App Inventor.
I have made a change and it works for me, with a test number and my own real mobile number. This was tested in an aia project using a webviewer with companion app on Android 13. Also tested in Chrome browser on my computer.
In the html file find this section:
// 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();
}
}
);
and change the word normal to invisible.
// Create a Recaptcha verifier instance globally
// Calls submitPhoneNumberAuth() when the captcha is verified
window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier(
"recaptcha-container",
{
size: "invisible",
callback: function(response) {
submitPhoneNumberAuth();
}
}
);
In some situations no recaptcha is required, in others a recaptcha is offered.
I tested it with two real phone numbers and there's no code sent to both of them
It works with tested number from the console with placed manual code but when i try real number it doesn't send any code
Not sure what else to suggest, given that it works OK for me here, on my real phone with a real number.
Probably needs other testers to try to pinpoint the problem?