# Two factor auth consistently returns invalid authentication code

**URL:** <https://meta.discourse.org/t/two-factor-auth-consistently-returns-invalid-authentication-code/84979>\
**Category:** Product Support\
**Created:** [10.Апрель.2018 13:53:00 UTC](https://meta.discourse.org/t/two-factor-auth-consistently-returns-invalid-authentication-code/84979 "2018-04-10T13:53:00Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![J5lx](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@J5lx](https://meta.discourse.org/u/J5lx)\
**Post date:** [14.Май.2018 20:02:53 UTC](https://meta.discourse.org/t/two-factor-auth-consistently-returns-invalid-authentication-code/84979/5 "2018-05-14T20:02:53Z")

</div>

I recently had the same issue on a forum I host, and in the end I figured out that it occurred because my server time was slightly off. Try comparing the time of your server (including seconds) to network time (e.g. via [time.is](https://Time.is)), and if it’s different make sure that your system is configured to sync its clock across the network (using something like systemd-timesyncd or ntpd, if you’re on Linux). For me that did the trick.

---

_[View the full topic](https://meta.discourse.org/t/two-factor-auth-consistently-returns-invalid-authentication-code/84979)._
