Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/oauth4webapi/build/index.d.ts>clockSkew

Low-Level OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
Latest
variable clockSkew
import { clockSkew } from "https://deno.land/x/oauth4webapi@v2.17.0/build/index.d.ts";

Use to adjust the assumed current time. Positive and negative finite values representing seconds are allowed. Default is 0 (Date.now() + 0 seconds is used).

Examples

When the local clock is mistakenly 1 hour in the past

const client: oauth.Client = {
  client_id: 'abc4ba37-4ab8-49b5-99d4-9441ba35d428',
  // ... other metadata
  [oauth.clockSkew]: +(60 * 60),
}

When the local clock is mistakenly 1 hour in the future

const client: oauth.Client = {
  client_id: 'abc4ba37-4ab8-49b5-99d4-9441ba35d428',
  // ... other metadata
  [oauth.clockSkew]: -(60 * 60),
}

type

unique symbol