From 5f0ed256d6b5cbfd62074141986483e625c856e2 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 4 Mar 2021 16:36:22 +0100 Subject: [PATCH] set expiresIn of JWT to 2 years --- backend/src/jwt/encode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/jwt/encode.js b/backend/src/jwt/encode.js index 9126f2577..50e439474 100644 --- a/backend/src/jwt/encode.js +++ b/backend/src/jwt/encode.js @@ -5,7 +5,7 @@ import CONFIG from './../config' export default function encode(user) { const { id, name, slug } = user const token = jwt.sign({ id, name, slug }, CONFIG.JWT_SECRET, { - expiresIn: '1d', + expiresIn: '2y', issuer: CONFIG.GRAPHQL_URI, audience: CONFIG.CLIENT_URI, subject: user.id.toString(),