Check Time Synchronization Status of Auth0 Server

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

  1. 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.
  2. On a machine whose time is synchronized like an AWS EC2 instance, compare the local time and the Auth0 server time.

  3. Follow these test steps:

    1. Launch an AWS EC2 instance, use timedatectl status command to check its time synchronization status
    2. Use date -u +"%s%3N" command to get the local time (before)
    3. Use the curl command to get Auth0 server time in the private cloud environment
    4. Use the date -u +"%s%3N" command to get the local time again (after)

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: