Error "Unable to verify authorization token due to server clock differences"

AI-generated summary

Users are experiencing an error when trying to log in with Google auth on Discourse: “Unable to verify authorization token due to server clock differences.” trusktr suspected their server’s NTP logs, which showed errors, might be the cause. RGJ suggested checking grep ntp /etc/services to ensure NTP was properly installed. trusktr discovered NTP was not installed on the correct server and fixed the issue by installing it.

Faizan_Zahid faced the same issue and checked grep ntp /etc/services as suggested, but still experienced problems. However, they were able to resolve the issue by following a solution from a related thread on meta.discourse.org: Google login stopped working after manual update, as mentioned in their follow-up post Faizan_Zahid.

I have Google auth enabled, and it was working. But then something happened (I think I accepted an automatic update to my machine specs on linode.com) and now Google auth doesn’t work, and Discourse says

Unable to verify authorization token due to server clock differences. Please try again.

whenever I try to log in with Google (I haven’t tried the other login methods except username/password).

I’m not sure what causes this error, and there’s no search results with answers on Google.

I did look at my server’s NTP logs, and I see errors like

ntpd[23986]: giving up resolving host 1.arch.pool.ntp.org: Servname not supported for ai_socktype (-8)

which seems like it would be related (causing a clock difference). Is this in fact what the problem may be?

What does grep ntp /etc/services tell you?
There should be two lines:

ntp             123/tcp
ntp             123/udp   

If they’re not there, add them and restart your ntp service.

Thanks for the tip!

Turns out I was confused: the Discourse is running on another server (my subdomain points to another PI)

On this other machine NTP was not installed, so I installed it (apt install ntp in Ubuntu), and now there’s no problem!

im facing the same issue,
please see output of grep ntp /etc/services

Does anyone else know what else can i do to fix this?

@RGJ

fixed it by following, Google Login Stopped Working after manual update