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

[CAUTH-511] improve error handling on missing captcha #1900

Merged

Conversation

jfromaniello
Copy link
Member

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

@jfromaniello jfromaniello requested a review from a team July 13, 2020 20:24
@jfromaniello jfromaniello changed the title [CAUTH-511] improve error handling on captcha [CAUTH-511] improve error handling on missing captcha Jul 13, 2020
@@ -54,7 +54,7 @@ export default class CaptchaInput extends React.Component {
</div>
<InputWrap
focused={focused}
invalidHint={invalidHint}
invalidHint=""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended?

Copy link
Member Author

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

https://auth0.slack.com/archives/GG1ENH909/p1594070548262000?thread_ts=1594069365.258500&cid=GG1ENH909

I think it doesn't look bad for the auth0 case, since the description is above like in the header of the widget

mhsu-auth0
mhsu-auth0 previously approved these changes Jul 13, 2020
@jfromaniello jfromaniello force-pushed the improve_error_handling_captcha branch 2 times, most recently from d13a640 to b36154b Compare July 14, 2020 19:43
@jfromaniello jfromaniello force-pushed the improve_error_handling_captcha branch from b36154b to 36d394f Compare July 15, 2020 14:31
Copy link
Contributor

@stevehobbsdev stevehobbsdev left a 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';
Copy link
Contributor

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.

Comment on lines +13 to +14
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.',
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@jfromaniello jfromaniello force-pushed the improve_error_handling_captcha branch from c909a2c to 09dbcad Compare July 16, 2020 11:27
@jfromaniello jfromaniello force-pushed the improve_error_handling_captcha branch from 09dbcad to da77d6b Compare July 16, 2020 12:11
@stevehobbsdev stevehobbsdev added this to the vNext milestone Jul 16, 2020
@stevehobbsdev stevehobbsdev merged commit 82f5618 into auth0:master Jul 16, 2020
@stevehobbsdev stevehobbsdev mentioned this pull request Jul 23, 2020
jfromaniello added a commit to jfromaniello/auth0-lock that referenced this pull request Jul 23, 2020
* improve error handling on captcha

* improve translation scripts

* add missing translations
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.

None yet

3 participants