Skip to content
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

Add reCAPTCHA and optional disable flag for user registration #749

Closed
wants to merge 16 commits into from

Conversation

dismantl
Copy link
Member

@dismantl dismantl commented Jul 8, 2020

Status

Ready for review

Description of Changes

This allows you to completely disable user registration by setting the environment variable DISABLE_REGISTRATION. Additionally, you can add Google reCAPTCHA v3 to the user registration page by setting the RECAPTCHA_V3_SITE_KEY, RECAPTCHA_V3_SECRET_KEY, and optionally RECAPTCHA_V3_THRESHOLD environment variables.

To Test

Set up a recaptcha v3 site with Google (using localhost and 127.0.0.1 for domain names) and add the site key and secret key to the .env file using above environment variables. Then make dev and register a user. You can then see the recaptcha score assigned to that registration by checking the docker logs. You should see something like this:

[2020-07-20 18:14:31,903] INFO in recaptcha3: {'success': True, 'challenge_ts': '2020-07-20T18:14:17Z', 'hostname': 'localhost', 'score': 0.9, 'action': 'registration'}

Notes for Deployment

Screenshots (if appropriate)

image

Tests and linting

  • I have rebased my changes on current develop

  • pytests pass in the development environment on my local machine

  • flake8 checks pass

@michplunkett michplunkett deleted the recaptcha branch July 16, 2024 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants