jamie-mh / AuthenticatorPro

📱 Two-Factor Authentication (2FA) client for Android + Wear OS
https://authenticatorpro.jmh.me
GNU General Public License v3.0
2.98k stars 198 forks source link

Mobile Time Synchronization Solution for OTP Validity #929

Closed IGProd closed 11 months ago

IGProd commented 1 year ago

Is your feature request related to a problem? Please describe.

The proposed solution aims to address the issue of time synchronization on mobile devices when OTP codes are considered invalid by other services. This solution involves updating the local NTP (Network Time Protocol) settings and synchronizing them with an NTP server provider to ensure precise time accuracy, similar to time.is.

Describe the solution you'd like

This solution ensures that your device's time remains accurate, preventing issues with OTP code validation by various services.(such facebook,paypal,etc)

For users with root access, you can execute the following commands: (use termux)

Set the NTP server: settings put --user 0 global ntp_server europe.pool.ntp.org Check the currently used NTP server: settings list global | grep ntp For users without root access, you can use ADB (Android Debug Bridge):

Set the NTP server: adb shell settings put --user 0 global ntp_server europe.pool.ntp.org Check the currently used NTP server: adb shell settings list global | grep ntp Screenshot_2023-09-05-12-09-03-03_2c2851f616de21a6da6fb44c83a25e93

jamie-mh commented 11 months ago

Android provides a native network provider time synchronisation protocol. I don't want to add NTP sync to the app, I feel that this is out of scope and would require the Internet permission.