Reputation: 1233
I am creating a flutter web app and I am using firebase auth to authenticate users with phone number.
await _auth.signInWithPhoneNumber(phoneNumber);
After executing this command, a reCAPTCHA banner appears at the bottom right corner of the page. After completing the reCAPTCHA test, the banner doesn't come off. Even after confirming the sms:
await confirmationResult!.confirm(smsCode);
How can I remove this banner completely?
Upvotes: 5
Views: 1536
Reputation: 21
This worked for me. Put this in index.html
<style>
.grecaptcha-badge { visibility: hidden;}
</style>
Upvotes: 2
Reputation: 668
On web you must call signInWithPhoneNumber
instead of verifyPhoneNumber
.
ConfirmationResult confirmationResult = await auth.signInWithPhoneNumber('+44 7123 123 456');
See: Phone Authentication | Firebase
Upvotes: 2
Reputation: 1233
Apperently it is easy:
final el = window.document.getElementById('__ff-recaptcha-container');
if (el != null) {
el.style.visibility = 'hidden';
}
Upvotes: 4