-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add reCAPTCHA support for web #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@rsegecin Fantastic! Would love to get this merged. First thing is that it will need to run the tests for Web in CI also: https://github.com/GoogleCloudPlatform/recaptcha-enterprise-flutter/blob/main/.github/workflows/ci.yml |
|
Thanks for the feedback @mcorner! I’m not very familiar with setting up Web tests in CI yet, so it may take me a bit to figure this out. Could you please mark this PR as a draft in the meantime? And if someone more experienced with these tests wants to jump in, that’d be great too. |
|
@rsegecin Unfortunately flutter test isn't supported for web: But looks like flutter drive is: So first step would be to see if you can get flutter drive to work with this in an integration test, then the CI part. I think you just need to add chromedriver to the workflow, but we will see. |
|
In my app case, mostly we can execute this code on Flutter web. Althought existing SDK doesn't support web. But, today we get reported issue from user that can't execute code below, user always get catch case. I'm confused, platform web support still in PR request but several browser can access it. try {
RecaptchaEnterprise.execute(RecaptchaAction.custom(action ?? ''))
} catch(e) {
debugPrint(e.toString());
}I hope this PR can be merged as soon as possible, with this changes makes our web app more trusted can integrated with recaptcha for web. |
I think your inquiry is better suited for stack overflow. This PR is only missing the automated test but you still can import this solution and use in your project by importing the PR's repo itself: |
This PR adds reCAPTCHA Enterprise support for web.
recaptcha_enterprise_web.dart.enterprise.jsscript.executemethod on web, keeping the API consistent with Android and iOS implementations.Notes