Skip to main content

core.trygetjwtexpiration

Home > @medplum/core > tryGetJwtExpiration

tryGetJwtExpiration() function

Returns the JWT expiration time in number of milliseconds elapsed since the epoch.

Signature:

export declare function tryGetJwtExpiration(token: string): number | undefined;

Parameters

ParameterTypeDescription
tokenstringThe JWT token.

Returns:

number | undefined

The JWT expiration time in number of milliseconds elapsed since the epoch if available, undefined if unknown.