ringcentral / ringcentral-extensible

RingCentral Extensible SDK
10 stars 6 forks source link

Extension for token auto refresh #20

Closed tylerlong closed 6 months ago

tylerlong commented 3 years ago

Provide an extension to auto refresh the token.

tylerlong commented 3 years ago

Here is the C# version https://github.com/ringcentral/RingCentral.Net/tree/master/RingCentral.Net.AutoRefresh

jeesus commented 3 years ago

I have a prototype for TS, but I think the TokenInfo class would need additional property expires_at or smth since the expires_in has no use when carried over subsequent requests as it's relative to the time token was issued at.

tylerlong commented 3 years ago

@jeesus I agree. However the TokenInfo class is auto generated base on swagger spec. You may need to sub-class it.

tylerlong commented 6 months ago

Done: https://github.com/ringcentral/ringcentral-extensible/tree/master/packages/extensions/auto-refresh