Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Handle expired jwt (#1622)
Luke Vella7b787c1b48cd
diff --git a/apps/web/src/auth/legacy/helpers/jwt.ts b/apps/web/src/auth/legacy/helpers/jwt.tsindex c93ceeff7..ad3428165 100644--- a/apps/web/src/auth/legacy/helpers/jwt.ts+++ b/apps/web/src/auth/legacy/helpers/jwt.ts@@ -9,10 +9,15 @@ export async function decodeLegacyJWT(token: string): Promise<JWT | null> {process.env.SECRET_PASSWORD,"",);- const { payload } = await jwtDecrypt(token, encryptionSecret, {- clockTolerance: 15,- });- return payload;+ try {+ const { payload } = await jwtDecrypt(token, encryptionSecret, {+ clockTolerance: 15,+ });+ return payload;+ } catch (e) {+ console.error(e);+ return null;+ }}async function getDerivedEncryptionKey(