atomicdata-dev / atomic-server

An open source headless CMS / real-time database. Powerful table editor, full-text search, and SDKs for JS / React / Svelte.
https://atomicserver.eu
MIT License
1.02k stars 46 forks source link

Error: Authentication failed: Difference in timestamp #737

Open tdmsoares opened 10 months ago

tdmsoares commented 10 months ago

I am running atomic-server using docker. I created the user, but soon after, I get the following message:

Authentication failed: Commit CreatedAt timestamp must lie in the past. Check your clock. Timestamp now: 1702278521628 CreatedAt is: 1702278750587

What should I do?

joepio commented 10 months ago

Apparently there's a significant mismatch between your client and server clock. These should be in sync.

Maybe I should disable this check by default, as adjusting a server clock might be a tad too much work in some situations.

joepio commented 10 months ago

Have you tried adjusting the clock, making sure they are in sync?

tdmsoares commented 10 months ago

Yes, I run timedatectl and it looked ok: $ timedatectl │ Local time: Fri 2023-12-15 18:58:42 CST │ Universal time: Sat 2023-12-16 00:58:42 UTC │ RTC time: n/a │ Time zone: America/Chicago (CST, -0600) │ System clock synchronized: yes │ NTP service: inactive │ RTC in local TZ: no When I run in Virtualbox as localhost no problem, the problem is in a server, using reverse proxy. In both cases I am using docker

joepio commented 10 months ago

Thanks for sharing. I'm not quite sure as to what could be causing the difference in the two times than. Maybe the client is a couple of hours ahead?

tdmsoares commented 10 months ago

Maybe the client is a couple of hours ahead?

Yeah, 3 hours ahead, to be exact