At times generates 1 digit OTP
Closed this issue · 2 comments
vibindhas commented
I think we can have a configuration to set the number of digits needed in OTP and generate based on that.
have a function like below
let OTPDigits = 4;
function getOTP() {
let otp = '';
for (let i = 0; i < OTPDigits; i++ ) {
otp += Math.floor(Math.random() * 10);
}
return Number(otp);
}
Call this method from generateOTP
AqibMukhtar commented
@vibindhas thank you so much for the fix. 😍
AqibMukhtar commented
The pull request has been approved and successfully merged. Thanks again