laravel-otp-validate
laravel-otp-validate copied to clipboard
Resend Service is disabled code 503 is working wrong
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.
Thanks for the suggestion, let me work on it