Skip to content

Commit

Permalink
Merge pull request #712 from HugoReeves/HugoReeves-patch-1
Browse files Browse the repository at this point in the history
Update jwt.helper.js to increase Github JWT Token duration
  • Loading branch information
HugoReeves committed Aug 4, 2023
2 parents 8b9b98e + 45993d6 commit 5508341
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions td.server/src/helpers/jwt.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const createAsync = async (providerName, providerOptions, user) => {
};
// Explore other options including issuer, scope, etc
const accessToken = jsonwebtoken.sign({ provider, user }, env.get().config.ENCRYPTION_JWT_SIGNING_KEY, {
expiresIn: '5m'
expiresIn: '1d'
});

const refreshToken = jsonwebtoken.sign({ provider, user }, env.get().config.ENCRYPTION_JWT_REFRESH_SIGNING_KEY, {
expiresIn: '24h'
expiresIn: '7d'
});

return { accessToken, refreshToken };
Expand Down
2 changes: 1 addition & 1 deletion td.server/test/helpers/jwt.helper.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('helpers/jwt.helper.js', () => {
sinon.match.any,
config.ENCRYPTION_JWT_SIGNING_KEY,
{
expiresIn: '5m'
expiresIn: '1d'
}
);
});
Expand Down

0 comments on commit 5508341

Please sign in to comment.