Bubka / 2FAuth

A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
https://docs.2fauth.app/
GNU Affero General Public License v3.0
2.31k stars 152 forks source link

pre-caculate next code before the current one expires #416

Open ElTopo opened 2 weeks ago

ElTopo commented 2 weeks ago

Is your feature request related to a problem? Please describe. Currently, when codes are expired and switched to the next codes, there's a short pause (about 1 second), I assume that's for calculating new codes. All the other 2fa apps I used, including web apps, switch to the new codes instantly, some apps, such as ente auth, even display the next code along with current one. The next code is not a secret, it's just the one that's calculated from the current expiring timestamp.

Describe the solution you'd like Pre-caculate the next code before the current one expires (e.g. 10 seconds before), so that when the app needs to switch to the next code it's already available.

Describe alternatives you've considered n/a

Additional context It would be nice to be able to also optionally display the next codes along the current ones. The next codes could be smaller but should be copiable. As an example, see the picture of ente auth app at https://www.news47ell.com/blog/ente-authenticator-review-e2ee-google-authenticator-alternative