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

[ESD-16401] Ensure Captcha is completed before authenticating with enterprise connection #2060

Merged
merged 2 commits into from
Nov 2, 2021

Conversation

stevehobbsdev
Copy link
Contributor

@stevehobbsdev stevehobbsdev commented Oct 27, 2021

Changes

This PR fixes an issue where the user can skip completing the captcha when using an enterprise connection, and makes sure the captcha is valid before proceeding with login.

Notes

Since some of the logic I needed to implement this existed under the database implementation, I extracted the bits out to a new file captcha.js to share the logic between database and enterprise.

Video

Video shows a working implementation:

Screen.Recording.2021-10-27.at.11.41.30.mov

References

ESD-16401 (internal ticket)

Testing

BrowserStack tests are still a bit flakey but I've verified that the E2E tests pass locally.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

@@ -0,0 +1,72 @@
import * as l from '../core/index';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is all pre-existing logic, and has just been extracted into a new module so that it can be shared between database and enterprise connection logic in the source tree.

@@ -33,7 +33,7 @@ function shouldRenderTabs(m) {
return hasScreen(m, 'signUp');
}

const Component = ({ i18n, model }) => {
const LoginComponent = ({ i18n, model }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed this so that the component name makes more sense when debugging with React developer tools.

@stevehobbsdev stevehobbsdev merged commit 067fa60 into master Nov 2, 2021
@stevehobbsdev stevehobbsdev deleted the esd-16401/captcha branch November 2, 2021 10:33
@stevehobbsdev stevehobbsdev mentioned this pull request Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants