-
Notifications
You must be signed in to change notification settings - Fork 45.7k
feat(platform): Add captcha to login, signup and password reset pages #9847
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: dev
Are you sure you want to change the base?
Conversation
Here's the code health analysis summary for commits Analysis Summary
|
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Turnstile configured on Cloudflare already?
autogpt_platform/backend/backend/server/v2/turnstile/service.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Krzysztof Czerwinski <[email protected]>
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
yes we have turnstile setup on cloudflare, I have been using it to set up this, if you would like the info to test it locally please let me know. Thank you for the review, I have made the changes you suggested and replied to some comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this break login/signup when hosting locally? Maybe bypass verification if there's no key on the backend?
Similarly with my recommendation to require verification on login but I don't think we can skip when there's no token on the frontend because token can be changed by the user?
autogpt_platform/backend/backend/server/v2/turnstile/service.py
Outdated
Show resolved
Hide resolved
@kcze im not sure i follow? i have been testing this locally and everything works perfectly fine with no of the turnstile keys set so it should not cause issues locally? if you have time could you test it locally to see if you have issues with signup/login? and if you want the keys to test with cloudflare let me know |
…s://github.com/Significant-Gravitas/AutoGPT into bently/secrt-1169-implement-captcha-on-sign-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested and both signup and login work locally without keys!
This PR adds Cloudflare's Turnstile CAPTCHA to the login, signup, and password reset pages. it is setup to only show and work when behave as is set to CLOUD so it will not show for local hosted users.
Changes 🏗️
Backend Changes
/api/turnstile/verify
to proxy verification requests to CloudflareFrontend Changes
Auth Flow Integration
login
,signup
, andreset_password
to accept and verify Turnstile tokensConfiguration Changes
NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY
: Public site key for frontendCLOUDFLARE_TURNSTILE_SECRET_KEY
: Secret key for backend verificationTest Plan 📋