heapsource / active_model_otp

Adds methods to set and authenticate against one time passwords (Two-Factor Authentication). Inspired in AM::SecurePassword
MIT License
782 stars 81 forks source link

After feature for TOTP to prevent code reuse #99

Closed thiagogabriel closed 1 year ago

thiagogabriel commented 2 years ago

It is useful to be able to prevent the code reuse on OTP, specially when sending the code via SMS, which requires the extension of the time the code will be valid by using drift.

ROTP reference: https://github.com/mdp/rotp/blob/2be11551ac4982670d526ceef4a5db985d0f626a/README.md#preventing-reuse-of-time-based-otps

paratiger commented 2 years ago

👍