-
Notifications
You must be signed in to change notification settings - Fork 145
Should Token type have expires
property?
#157
Comments
Seconded. We need a mechanism to renew the token before it expires |
Bumping this one. Really needed! Maybe add a timespan to the expired method like:
|
I'm just migrating our use of this library to typescript, we've been depending on the expires property to know when to call refresh on the token in a long running process. So +1 for: "Is expires a private or public property? If it's just a case of updating the types, then I'd happily open a PR |
as a workaround I'm doing: const expiresIn = parseInt(accessToken.data.expires_in) || 0;
accessToken.expiresIn(expiresIn - EXPIRATION_WINDOW_IN_SECONDS); |
+1 for saving an expiry date instead of a expires_in number. |
@ErwinSteffens is it |
From
console.log
it does appear that this property is available, but it is not exposed.Is it a private property or can it be made public?
https://github.com/mulesoft/js-client-oauth2/blob/a237644785b4910689dd72f1c5d6905fa3a88ae7/index.d.ts#L61-L72
The text was updated successfully, but these errors were encountered: