Last updated: Nov 21, 2024
Overview
This article explains how to determine if the Auth0 Server time is synchronized.
Applies To
- Time Synchronization
- Auth0
Solution
-
The Auth0 server has a
/test
endpoint that returns the current time of the Auth0 server.- Please note it is not a public endpoint, and it is supposed to be used for testing purposes only.
-
On a machine whose time is synchronized like an AWS EC2 instance, compare the local time and the Auth0 server time.
-
Follow these test steps:
- Launch an AWS EC2 instance, use
timedatectl status
command to check its time synchronization status - Use
date -u +"%s%3N"
command to get the local time (before) - Use the
curl
command to get Auth0 server time in the private cloud environment - Use the
date -u +"%s%3N
" command to get the local time again (after)
- Launch an AWS EC2 instance, use
Note: the date -u +"%s%3N"
command and the Auth0 /test
endpoint give the timestamp in milliseconds since 1970-01-01T00:00:00Z
Assuming the time spent on both ways (to and from Auth0 server) are the same, the Auth0 server timestamp should be in the middle of the before and after timestamps.
Here are an example of the test results: