Hi doubts about Django-OTP time zone!

52 views
Skip to first unread message

13833...@163.com

unread,
Mar 22, 2019, 8:56:13 AM3/22/19
to django-otp

We all know that Django-OTP is time-based. My application scenario is that the server is in one country, and users will make access requests in different countries. So how can I guarantee the time synchronization of otp? I have been puzzled about this question for a long time. I hope I can get an answer. Thank you!

Peter Sagerson

unread,
Mar 22, 2019, 11:49:45 AM3/22/19
to djang...@googlegroups.com
django-otp is not necessarily time-based. Verification is done by plugins, which can use a variety of mechanisms. One of the most popular is TOTP (e.g. Google Authenticator), which relies on Unix timestamps. Specifically, the number of (usually) 30-second intervals since 1970-01-01 00:00:00 UTC.[1][2]

In general, time zones are mostly an issue at the point where users are involved with entering or reading date/time information. Low-level algorithms like TOTP are always designed in terms of Unix timestamps or some other universal reference point.

Thanks,
Peter




On Mar 22, 2019, at 5:56 AM, 13833...@163.com wrote:


We all know that Django-OTP is time-based. My application scenario is that the server is in one country, and users will make access requests in different countries. So how can I guarantee the time synchronization of otp? I have been puzzled about this question for a long time. I hope I can get an answer. Thank you!

--
You received this message because you are subscribed to the Google Groups "django-otp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-otp+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

13833...@163.com

unread,
Mar 22, 2019, 3:05:05 PM3/22/19
to django-otp
Oh, thank you very much. It seems that I haven't learned enough about OTP and need to learn more. Thanks again!

在 2019年3月22日星期五 UTC+8下午11:49:45,Peter Sagerson写道:
Reply all
Reply to author
Forward
0 new messages