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

fix(verification): prevents otp request when limit exceeded #2586

Merged
merged 2 commits into from
Aug 16, 2021

Conversation

seaerchin
Copy link
Contributor

Problem

At the present moment, users that have already loaded the page can continue to verify their mobile number, even when the form then disables OTP verification
Closes #2531

Solution

  1. check if the form is onboarded
  2. check if the form has verifiable mobile fields

Notes
users can request OTP from 2 endpoints - handleGetOtp or handleGenerateOtp. this check is only added on handleGenerateOtp because there are very few calls to handleGetOtp and we would have to query for actual form level data from the db to establish if the otp generation is valid.

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

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

lgtm

@karrui karrui merged commit a40e6bd into develop Aug 16, 2021
@karrui karrui deleted the fix/generate-otp branch August 16, 2021 04:44
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.

Fix generate OTP issue
2 participants