911 signin captcha
Part of #911
- Add Cloudflare captcha.
There is a small problem when the user fills in the email and clicks the sign-in button too fast, the captcha may not be loaded yet (it can take 2s depending on the internet connection). And the website will inform the captcha is invalid which may confuse the users because they don't see any captcha on the page. Here are a few solutions.
- Disable the button until the
onSuccesscallback gets called. But maybe there is a situation that the captcha never gets successful, and the user won't be able to log in. - Check for the captcha response when the user clicks login and shows a toast.
- Switch to visible captcha.
maybe I'm just overlooking this right now, but is it possible that we have a setting to circumvent (i.e. disable) the captcha, maybe via an environment variable?
maybe I'm just overlooking this right now, but is it possible that we have a setting to circumvent (i.e. disable) the captcha, maybe via an environment variable?
Sure, I will try to add it now.
:x: pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
:x: pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
I have no idea why the tests only fail in CI, in local they still passing.
Let me copy your branch and see if i can replicate this test failure. The fact that everything fails is worrisome
The web changes look good to me. Does the local docker compose stack still work fine using these fake captcha credentials?
Yes, it still works.
Let me copy your branch and see if i can replicate this test failure. The fact that everything fails is worrisome
All the tests failed because can't log in, which probably related to my changes
@fozziethebeat I managed to reproduce the test fails in the local by running a full build (docker compose up). Will try to fix the tests tonight.
@fozziethebeat I have no idea to fix the tests so I disable the captcha for now, lol. If you have time, please help me out.
@yk can you do a final review of the non-web changes? They seem to address your request of an env variable to disable the captcha
Merging!
@notmd can you share in discord what env variables we have to setup on the deployment instances? If you can generate them and send them to me privately I can add them to Github secrets