Merge pull request #1403 from omnivore-app/fix/token-exp

Extend expiration of the jwt token to 1 year
This commit is contained in:
Hongbo Wu 2022-11-10 17:43:20 +08:00 committed by GitHub
commit f3e5076a29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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({