Function: calculateOAuthTokenExpiresAtEpochMs()
function calculateOAuthTokenExpiresAtEpochMs(args: {
expiresInSeconds?: number;
nowEpochMs: number;
providerName: string;
}): number;
Defined in: electron/services/cloud/providers/oauthTokenExpiry.ts:14
Calculates and validates an OAuth access-token expiration timestamp.
Parameters
args
expiresInSeconds?
number
nowEpochMs
number
providerName
string
Returns
number
Remarks
OAuth providers return relative expires_in values. Convert them to an
absolute epoch value only after bounding the result to the app-wide timestamp
range, otherwise a malformed provider response can produce an invalid Date.