Docker Jwt Expiry Cannot increase
jigjosh opened this issue · comments
we are not able to increase the JWT Expiry and it stick with 3600S === 1h.
it seem the issue with env.config.ts which using Number.isInteger function
for checking AUTHENTICATION_JWT_EXPIRIN_IN environment
Make the change when creating the container.
- AUTHENTICATION_JWT_EXPIRIN_IN: is a container environment variable that can be set/changed at the time of its creation.
yes but it seem when try to creating the container with -e AUTHENTICATION_JWT_EXPIRIN_IN=604800 in the env.config.ts it check Number.isinteger('604800') which return false and it set 3600
In
env.config.ts
JWT: {
EXPIRIN_IN: Number.isInteger(process.env?.AUTHENTICATION_JWT_EXPIRIN_IN)
? Number.parseInt(process.env.AUTHENTICATION_JWT_EXPIRIN_IN)
: 3600,
SECRET: process.env.AUTHENTICATION_JWT_SECRET,
},
now Number.isInteger(process.env?.AUTHENTICATION_JWT_EXPIRIN_IN)
always return false because process.env?.AUTHENTICATION_JWT_EXPIRIN_IN
pass as string
I'll check it out.