Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 761 Bytes

clockTolerance.md

File metadata and controls

24 lines (16 loc) · 761 Bytes

Variable: clockTolerance

💗 Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


const clockTolerance: unique symbol

Use to set allowed clock tolerance when checking DateTime JWT Claims. Only positive finite values representing seconds are allowed. Default is 30 (30 seconds).

Example

Tolerate 30 seconds clock skew when validating JWT claims like exp or nbf.

let client: oauth.Client = {
  client_id: 'abc4ba37-4ab8-49b5-99d4-9441ba35d428',
  // ... other metadata
  [oauth.clockTolerance]: 30,
}