-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auth): enable recaptcha for signup (#318)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Integrated Google reCAPTCHA into the signup process for enhanced security. - Added configuration for reCAPTCHA in the deployment workflow. - **Bug Fixes** - Improved error handling for reCAPTCHA in the signup form. - **Chores** - Updated dependencies to include `django-recaptcha`. - Modified logging configuration to include specific logging for reCAPTCHA events. These changes enhance user experience by improving signup security and ensuring smoother deployment processes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
12 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
DJANGO_BUILD_DIR=/usr/src/build | ||
DJANGO_STATIC_ROOT=/usr/src/static | ||
DJANGO_MEDIA_ROOT=/usr/src/media | ||
# test keys are NOT suitable for v2 recaptcha | ||
DJANGO_RECAPTCHA_SITE_KEY=" " | ||
DJANGO_RECAPTCHA_SECRET_KEY=" " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from __future__ import annotations | ||
|
||
from allauth.account.forms import SignupForm as AllauthSignupForm | ||
from django_recaptcha.fields import ReCaptchaField | ||
from django_recaptcha.widgets import ReCaptchaV3 | ||
|
||
|
||
class SignupForm(AllauthSignupForm): | ||
recaptcha = ReCaptchaField( | ||
widget=ReCaptchaV3( | ||
action="signup", | ||
attrs={"theme": "clean"}, | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters