Implemenation idea: store the last used time step for each user. A TOTP should only be accepted if the stored time step is lower than the current time step.
A better implementation is probably to store the id + code as a memcached entry and let it expire after a minute. If the entry already exists, then the code should be rejected
Implemenation idea: store the last used time step for each user. A TOTP should only be accepted if the stored time step is lower than the current time step.