-
Notifications
You must be signed in to change notification settings - Fork 447
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
Number of digits are not consistent #33
Comments
Hey Shivani, Not sure what could be happening here. Do you have any example code where it's showing this behavior? I wrote up a quick test and didn't see any delivered without the padding. Is it possible ActiveRecord is converting it to an integer? Thanks |
Hi Mark I do not have example code for it. But it is mostly same as what is shown on the ActiveModel_otp gem. Thank you will update once I will get something. |
@mdp You were right it was due to dataType of the table. As I had it as integer and that was causing this issue in the padding. Thanks for the help!! |
Hi I am using "active_model_otp" gem and that uses internally "rotp" gem. As per the active_model_otp gem default code it should be generating 6 digit code. While I am doing extensive testing, I that found many times 3 or 4 digit code is getting generated.
And then it fails in VERIFY section. It is causing alot of trouble. Infact the developer of active_model_otp has also implemented PADDING by default but still it is not doing any padding and I am still getting 3 digit code.
For reference here is the link where I have posted question on active_model_otp
heapsource/active_model_otp#12
https://github.com/heapsource/active_model_otp/blob/4ec7c5686211be6cf9a08dc022c69ca7eddf077a/lib/active_model/one_time_password.rb#L24
https://github.com/heapsource/active_model_otp/blob/4ec7c5686211be6cf9a08dc022c69ca7eddf077a/lib/active_model/one_time_password.rb#L41
Thanks
Shivani
The text was updated successfully, but these errors were encountered: