Working with a NetDocuments OAuth server it returns the client credentials token with expires_in formatted as a string and not a number.
Would it be possible to modify grant_base.ts parseTokenResponse method to support expires_in as both number and string and convert to number if needed prior to assignment to tokens.expires_in?
Example Concept...
if (
! ['number', 'string'].includes(typeof body.expires_in)
) {
throw new TokenResponseError(
"expires_in is not a string or number",
response,
);
}
....
if (body.expires_in) {
if (typeof body.expires_in == 'string') {
body.expires_in = parseInt(body.expires_in);
}
tokens.expiresIn = body.expires_in;
}
Working with a NetDocuments OAuth server it returns the client credentials token with expires_in formatted as a string and not a number.
Would it be possible to modify grant_base.ts parseTokenResponse method to support expires_in as both number and string and convert to number if needed prior to assignment to tokens.expires_in?
Example Concept...
....