fix(core.gbapp): #387 adding /setupSecurity multiple tokens. Refresh token fix. @othonlima.
This commit is contained in:
parent
efa5e0fd03
commit
40d07a43c0
1 changed files with 3 additions and 0 deletions
|
@ -606,6 +606,7 @@ export class GBVMService extends GBService {
|
|||
const tokens = this.tokens ? this.tokens.split(',') : [];
|
||||
|
||||
for(i in tokens) {
|
||||
const tokenNAme = tokens[i];
|
||||
const expiresOn = new Date(global[tokenName + "_expiresOn"]);
|
||||
|
||||
if (expiresOn.getTime() > new Date().getTime()) {
|
||||
|
@ -614,6 +615,8 @@ export class GBVMService extends GBService {
|
|||
|
||||
global[tokenName] = token;
|
||||
global[tokenName + "_expiresOn"]= expiresOn;
|
||||
|
||||
console.log(tokenName + ' updated.');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue