Sinch Verification API resending same code

257 Views Asked by At

My development team are using the JavaScript Sinch Verification method for verifying Mobile numbers.

The iOS app calls the server to request a Sinch Verification code to be sent via SMS.

On the initial request for a verification code, a code is successfully delivered. When I request via the iOS app for the code to be resent, my expectation is that a new code is generated and sent to the mobile number.

Developers in India have shown their mobile phone with a different verification codes being delivered following 2 concurrent requests.

I am in Australia calling the same service, and receive the same verification code for the 2 concurrent requests.

1

There are 1 best solutions below

1
On

so this is how it works.

if you request the code again without entering the wrong or right code for a short time period the same code is sent out. Why is that you may ask. The reason is to reduce a race condition in delivery of sms so the "wrong"/old code is delivered after you made you second request. If you verify the code you received. and then make a new request the code will be different.