rebranding to forum, adding settings and stripe page

This commit is contained in:
metacryst
2026-02-20 03:51:31 -06:00
parent aaf9d56b1b
commit dd9552aad1
19 changed files with 113 additions and 14 deletions

View File

@@ -46,7 +46,12 @@ export default class Socket {
const cookies = parseCookies(req.headers.cookie);
const token = cookies.auth_token;
if (!token) throw new Error("No auth token");
const payload = jwt.verify(token, process.env.JWT_SECRET);
let payload;
try {
payload = jwt.verify(token, process.env.JWT_SECRET);
} catch(e) {
console.error("error: jwt is expired ", e)
}
ws.userEmail = payload.email;
ws.on('message', (msg) => {