Skip to content

Proper CAPTCHA error Handling in client-cognito-identity-provider #7255

@achrafsouk

Description

@achrafsouk

Describe the feature

When Cognito user pool is used with an AWS WAF that includes a CAPTCHA, there is no proper way to detect a 405 response code signaling to the front end to display AWS WAF CAPTCHA.

As a workaround, I check the error message if it contains the 'captcha' keyword to trigger the CAPTCHA rendering in the frontend. This is not a great long term solution.

Use Case

Protecting a Cognito endpoint with CAPTCHA.

Proposed Solution

The best is to have a CAPTCHA error type that can be caught and properly handled in the front end.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

v4

Environment details (OS name and version, etc.)

Mac

Metadata

Metadata

Assignees

Labels

feature-requestNew feature or enhancement. May require GitHub community feedback.p3This is a minor priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions