fix(core.gbapp): #387 adding /setupSecurity multiple tokens. Refresh token fix. @othonlima.

This commit is contained in:
Rodrigo Rodriguez 2023-12-26 11:45:36 -03:00
parent 145cb47724
commit c2ed3f65ce

View file

@ -609,7 +609,7 @@ export class GBVMService extends GBService {
const tokenName = tokens[i]; const tokenName = tokens[i];
const expiresOn = new Date(global[tokenName + "_expiresOn"]); const expiresOn = new Date(global[tokenName + "_expiresOn"]);
if (expiresOn.getTime() > new Date().getTime()) { if (expiresOn.getTime() < new Date().getTime()) {
const {token, expiresOn} = await sys.getCustomToken({pid, tokenName}); const {token, expiresOn} = await sys.getCustomToken({pid, tokenName});