-
Notifications
You must be signed in to change notification settings - Fork 556
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
[CAUTH-511] improve error handling on missing captcha #1900
[CAUTH-511] improve error handling on missing captcha #1900
Conversation
@@ -54,7 +54,7 @@ export default class CaptchaInput extends React.Component { | |||
</div> | |||
<InputWrap | |||
focused={focused} | |||
invalidHint={invalidHint} | |||
invalidHint="" |
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 this intended?
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.
No, this is actually intended.. The component is generic and it requires an invalidHint parameter, the invalidHint
text is shared for all components.
Tony suggested this text get replaced here and I didn't know what to use
I think it doesn't look bad for the auth0 case, since the description is above like in the header of the widget
d13a640
to
b36154b
Compare
b36154b
to
36d394f
Compare
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.
Couple of minor points but the translations one could be blocking. Let's catch up internally.
@@ -7,7 +7,7 @@ import * as l from '../../core/index'; | |||
import { swap, updateEntity } from '../../store/index'; | |||
import * as captchaField from '../captcha'; | |||
import { getFieldValue, isFieldVisiblyInvalid } from '../index'; | |||
import { ReCAPTCHA } from './recaptchav2'; | |||
import { ReCAPTCHA } from './recaptchav2.jsx'; |
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 it necessary to include the extension here? We don't appear to need to do this in other places.
invalid_captcha: 'Solve the challenge question to verify you are not a robot.', | ||
invalid_recaptcha: 'Select the checkbox to verify you are not a robot.', |
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.
We may need to provide additional translations for these, at least for the supported EU countries. I will ping you an internal conversation for context.
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.
done!
c909a2c
to
09dbcad
Compare
09dbcad
to
da77d6b
Compare
* improve error handling on captcha * improve translation scripts * add missing translations
Changes
This pull-request improve the error handling for both types of captcha. I am attaching here two gifs:
Also we raise the error before sending the request to the server side to avoid a round trip.
References
https://auth0team.atlassian.net/browse/CAUTH-511
Testing
I've tested this manually.
Checklist