-
Notifications
You must be signed in to change notification settings - Fork 7
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
#2697 captcha to feedback from submission #2792
Changes from 3 commits
176df83
43d1308
1739126
bc4783b
6ab6e13
fd4cdc0
b247406
203e6e9
641a211
0da6aa8
73d3499
22457fc
d512dce
8bbdb22
ce33e39
28ad0da
2c03455
01cdc65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,9 @@ interface SignInFormProps { | |
setRegistrationScreenOn: (active: boolean) => void; | ||
} | ||
|
||
const RECAPTCHA_SITE_KEY = process.env.RECAPTCHA_SITE_KEY as string; | ||
const RECAPTCHA_SITE_KEY = window.Cypress | ||
? '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this supposed to be secret? not sure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for your feedback! That's a great question. It is a ReCaptchas site-key for testing purposes which is available for all developers: https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do Since every developer have access to it and it is the same for everyone I didn't set it as a secret. |
||
: (process.env.RECAPTCHA_SITE_KEY as string); | ||
|
||
export default function SignInForm({ | ||
disabled, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ import { sendCustomGtmEvent } from '../util/helperFunctions'; | |
import ReCAPTCHA from 'react-google-recaptcha'; | ||
import PasswordStrengthBar from 'react-password-strength-bar'; | ||
|
||
|
||
const useStyles = makeStyles((theme: Theme) => ({ | ||
checkboxRoot: { | ||
display: 'block', | ||
|
@@ -93,7 +92,9 @@ interface SignUpFormProps { | |
setRegistrationScreenOn: (active: boolean) => void; | ||
} | ||
|
||
const RECAPTCHA_SITE_KEY = process.env.RECAPTCHA_SITE_KEY as string; | ||
const RECAPTCHA_SITE_KEY = window.Cypress | ||
? '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
: (process.env.RECAPTCHA_SITE_KEY as string); | ||
|
||
export default function SignUpForm({ | ||
disabled, | ||
|
@@ -166,7 +167,6 @@ export default function SignUpForm({ | |
const token = | ||
(await recaptchaRef.current.executeAsync()) as string; | ||
recaptchaRef.current.reset(); | ||
|
||
dispatch( | ||
signUpWithEmailAndPassword({ | ||
email, | ||
|
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.
why is the Sign-in button being clicked so many times?
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.
It is clicked so many times to trigger the login/register limiter that will be used after 4 unsuccessful attempts. I will change the number of clicks to the previous commit which is 5 times.