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

[SG-656] Send a captcha bypass token back from the register endpoint #2278

Merged
merged 4 commits into from
Sep 15, 2022

Conversation

addisonbeck
Copy link
Contributor

@addisonbeck addisonbeck commented Sep 14, 2022

https://bitwarden.atlassian.net/jira/software/c/projects/SG/boards/71?modal=detail&selectedIssue=SG-656

This will be part of a cloud server hotfix.

Type of change

- [x] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

The trial initiation flow has a registration step that automatically does a login in the background. This has Captcha problems, namely that it can spawn two captchas in a row - one during registration and one during login. This is not ideal UX, so we've added a bypass token that returns from the registration endpoint that can be used to skip the next captcha.

bitwarden/clients#3531 depends on this change.

Code changes

  • Create a model to encapsulate a RegistrationResponse
  • Generate a user CaptchaBypassToken after a successful registration that we return to caller.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

differsthecat
differsthecat previously approved these changes Sep 14, 2022
Copy link
Member

@differsthecat differsthecat left a comment

Choose a reason for hiding this comment

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

Nice solution!

@addisonbeck addisonbeck merged commit 287dc2e into master Sep 15, 2022
@addisonbeck addisonbeck deleted the fix/trialInitiation branch September 15, 2022 14:02
addisonbeck added a commit that referenced this pull request Sep 15, 2022
…2278)

* Send a captcha bypass token back from the register endpoint

* [review] Use existing user

* [review] Introduce ICaptcheProtectedResponseModel
addisonbeck added a commit that referenced this pull request Sep 15, 2022
…2278)

* Send a captcha bypass token back from the register endpoint

* [review] Use existing user

* [review] Introduce ICaptcheProtectedResponseModel
addisonbeck added a commit that referenced this pull request Sep 15, 2022
…2278)

* Send a captcha bypass token back from the register endpoint

* [review] Use existing user

* [review] Introduce ICaptcheProtectedResponseModel
addisonbeck added a commit that referenced this pull request Sep 16, 2022
…2278)

* Send a captcha bypass token back from the register endpoint

* [review] Use existing user

* [review] Introduce ICaptcheProtectedResponseModel
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.

3 participants