Skip to content

Commit

Permalink
Update jwt.helper.js
Browse files Browse the repository at this point in the history
Update access token and refresh token duration.
Access token updated to 1 day from 5 minutes.
Refresh token updated to 7 days from 24 hours.
  • Loading branch information
HugoReeves committed Aug 4, 2023
1 parent 8b9b98e commit cd903da
Showing 1 changed file with 2 additions and 2 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

0 comments on commit cd903da

Please sign in to comment.