pyauth / pyotp

Python One-Time Password Library
https://pyauth.github.io/pyotp/
Other
2.91k stars 319 forks source link

added method to get totp from current correct time queried from NTP server #117

Closed abhijitmamarde closed 3 years ago

abhijitmamarde commented 3 years ago

added method to get totp from current correct time queried from NTP server

kislyuk commented 3 years ago

Thanks for your contribution. While I definitely want to encourage contributions, this one is probably going to fall outside the scope of this library and will have to be distributed as a separate utility/library on its own. The main reason is that querying the NTP server like this is a new and potentially unexpected behavior, and introduces new security risks which are not adequately documented in this PR. In addition, the ntp server is hardcoded (even though it's a keyword argument, the function is hidden in a closure).

kislyuk commented 3 years ago

The alternative to this PR that I would accept as a contribution in PyOTP is documentation on how to use chrony or ntpd to achieve this result.