Skip to content

The "Send Code" button for MFA is never enabled even after entering valid phone number and successful recaptcha #711

@faridghar

Description

@faridghar

I'm trying to run the the MFA authentication example on Firebase Hosting. After signing up a user and verifying the email, when I click the "Enroll" button and enter a valid phone number (+971XXXXXXX) and successfully do the recaptcha (I see a green check mark), the "Send Code" button remains disabled. Upon debugging, it seems the issue is is in line 396 of the "mfa-password.js" file because the grecpatcha variable is undefined whereas the recaptchaWidgetId variable is not null. So the if condition fails and the function returns false. If I modify the isCaptchaOK() function to simply return true (hardcoded), then the button becomes enabled and I'm able to successfully receive a verification code on my phone.

I'm not a recpatch expert but it doesn't seem like there's anywhere in the mfa-password.js where the grecpatch variable is being initialized. Am I missing something or is this variable somehow initialized by the recaptcha library? If so, why isn't it working in my case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions