Close

Variable interval support

A project log for Hardware 2FA TOTP authenticator

Small USB 2FA authenticator for up to 32 profiles

itzandroidtabitzandroidtab 03/24/2024 at 00:340 Comments

Added support for the last missing item to make the authenticator work with most 2FA providers. Support for variable intervals.  This allows the user to set a interval in the CSV file (was already in the file but unused). The interval is used to calculate the counter used in the TOTP algorithm (epoch / interval = TOTP counter value). Most providers use the default of 30 seconds, but I have seen some cases where 60 seconds is used. 

The authenticator supports intervals from 1 to 180 seconds (dont think less than 30 seconds is used anywhere but just to be sure). The 180 second limit is caused by the division of the circle that shows the amount of time left. The circle is split in 180 parts. By disabling splitting the circle it should be possible to have intervals up to 360 seconds (and by removing the circle the timeout can be any value).

During testing I also centered the profile text. I was experimenting with some other features and I think this looks better.

Test profile with a 70 seconds interval
Test profile with a 15 seconds interval

Discussions