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

[BUG] OTP Errors #492

Open
seaerchin opened this issue Aug 22, 2022 · 0 comments
Open

[BUG] OTP Errors #492

seaerchin opened this issue Aug 22, 2022 · 0 comments
Labels
bug Something isn't working engineering

Comments

@seaerchin
Copy link
Contributor

Problem

OTP errors are not differentiated and are all treated equally as being invalid OTPs (meaning that eg: ground truth value is 0000 but entered value is 1111), even when some OTPs are expired.

For a clear example of this, see src/routes/v2/authenticated/users.ts, line 104, where we call the verifyOtp method and if it fails, returns a generic BadRequestError instead of attempting to further distinguish the error.

Suggested solution

  1. distinguish the error at totpGenerator
  2. return diff error messages based on the above
@seaerchin seaerchin added bug Something isn't working engineering labels Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working engineering
Projects
None yet
Development

No branches or pull requests

1 participant