nodejs-sdk icon indicating copy to clipboard operation
nodejs-sdk copied to clipboard

bug: Add to src/token-service/metadata-token-service.ts regular token updates

Open Zork33 opened this issue 11 months ago • 0 comments

Right now the token is not renewed, and after 12 hours Iam token gets expired

Token needs to be refreshed every 1 hour (~10% of 12 hours as recommended in Iam documentation)

The refresh should be done at the time the token is requested. With timer based implementation, two problems arise:

  • It is not known when the objectmetadata-token-service.ts class object becomes unnecessary, so there is no a place where to clear a timer
  • In serverless functions a timer behaves specifically - it doesn't work at all between serverless function calls.

Zork33 avatar Jul 21 '23 00:07 Zork33