Laravel package for OTP validation with built-in features like max retry and resend mechanism. Both OTP/Security Code over SMS or Email or AWS SNS of your choice with template user-defined.
71
stars
13
forks
source link
Resend Service is disabled code 503 is working wrong #16
I have setup max-send and max-resend to 5 and after requesting the OTP twice one using OtpValidator::requestOtp() and another using OtpValidator::validateOtp() code is showing error Resend Service is disabled with code: 503
When I checked the database, I found there was 1 entry for today, 1 from 6 days earlier and 4 entries from 20 days ago. It seems plugin is only checking the old OTP entries via client_req_id instead of client_req_id + created_at.
Upon more inspection I found that the core method countResend() is just using client_req_id and type to fetch the resend count. The query should have included the time as well.
I have setup max-send and max-resend to 5 and after requesting the OTP twice one using
OtpValidator::requestOtp()
and another usingOtpValidator::validateOtp()
code is showing errorResend Service is disabled
withcode: 503
When I checked the database, I found there was 1 entry for today, 1 from 6 days earlier and 4 entries from 20 days ago. It seems plugin is only checking the old OTP entries via
client_req_id
instead ofclient_req_id
+created_at
.Upon more inspection I found that the core method
countResend()
is just usingclient_req_id
andtype
to fetch the resend count. The query should have included the time as well.