Hello,
I would like to override _tokenExpiresSoon as it is capped to 1 hour and I need this to be flexible (different needs, different clients).
Here is how I would like it to be and how I put it in my client/account.js file :
const CUSTOM_MIN_TOKEN_LIFETIME_CAP_SECS = 3600 * 9; // 9 hours
AccountsClient.prototype._tokenExpiresSoon = function _tokenExpiresSoon(when) {
const minLifetimeMs = CUSTOM_MIN_TOKEN_LIFETIME_CAP_SECS * 1000;
return new Date() > (new Date(when) - minLifetimeMs);
};
This is not working and as I understand it it is because the function is overriden too late.
=> When I set a breakpoint in Chrome DevTool I see that _tokenExpiresSoon still points in account_common.js.
Do any of you have a suggestion to make this work ?
Thanks a lot