privacyidea / pi-authenticator

OTP Authenticator App for privacyIDEA Authentication Server
Other
41 stars 21 forks source link

Wrong remaining time in day password #315

Closed cornelinux closed 1 year ago

cornelinux commented 1 year ago

I enrolled a day password token with 12h. In my TZ in runs from 2am -> 2pm -> 2am.

It works great in the morning. In the afternoon, at 3pm it correctly says it is valid till "next day, 2am".

But if I toggle the display, it shows a wrong remaining time.

At 3:11pm it says: "remaining time 2:02:55" which does not sound right. It seems there is a problem in calculating the remaining time from one day to the other. At 3:11pm the remaining time should be: 10:49:00

frankmer commented 1 year ago

Fixed by 402016 update: On some devices, the countdown stops when the application is in the background. Fixed by recalculating the remaining time on resume.