Extend expiration of the jwt token to 1 year

This commit is contained in:
Hongbo Wu
2022-11-10 17:42:25 +08:00
parent f56de45ed0
commit 69d6b60adc
2 changed files with 4 additions and 4 deletions

View File

@ -64,6 +64,6 @@ export const signFeatureToken = (feature: Feature): string => {
grantedAt: feature.grantedAt ? feature.grantedAt.getTime() / 1000 : null,
},
env.server.jwtSecret,
{ expiresIn: '1d' }
{ expiresIn: '1y' }
)
}

View File

@ -82,7 +82,7 @@ describe('features resolvers', () => {
grantedAt: Date.now() / 1000,
},
env.server.jwtSecret,
{ expiresIn: '1d' }
{ expiresIn: '1y' }
)
expect(res.body.data.optInFeature).to.eql({
@ -144,7 +144,7 @@ describe('features resolvers', () => {
grantedAt: null,
},
env.server.jwtSecret,
{ expiresIn: '1d' }
{ expiresIn: '1y' }
)
expect(res.body.data.optInFeature).to.eql({
@ -186,7 +186,7 @@ describe('features resolvers', () => {
grantedAt: Date.now() / 1000,
},
env.server.jwtSecret,
{ expiresIn: '1d' }
{ expiresIn: '1y' }
)
expect(res.body.data.optInFeature).to.eql({