selfhostable, read-only reddit client
16
fork

Configure Feed

Select the types of activity you want to include in your feed.

everything expires in 5 days

Akshay e2c41082 5c78a231

+4 -4
+4 -4
src/routes/index.js
··· 150 150 hashedPassword, 151 151 }); 152 152 const id = insertedRecord.lastInsertRowid; 153 - const token = jwt.sign({ username, id }, JWT_KEY, { expiresIn: "100h" }); 153 + const token = jwt.sign({ username, id }, JWT_KEY, { expiresIn: "5d" }); 154 154 res 155 155 .status(200) 156 156 .cookie("auth_token", token, { 157 157 httpOnly: true, 158 - maxAge: 2 * 24 * 60 * 60 * 1000, 158 + maxAge: 5 * 24 * 60 * 60 * 1000, 159 159 }) 160 160 .redirect("/"); 161 161 } catch (err) { ··· 177 177 .get({ username }); 178 178 if (user && (await Bun.password.verify(password, user.password_hash))) { 179 179 const token = jwt.sign({ username, id: user.id }, JWT_KEY, { 180 - expiresIn: "1h", 180 + expiresIn: "5d", 181 181 }); 182 182 res 183 183 .cookie("auth_token", token, { 184 184 httpOnly: true, 185 - maxAge: 2 * 24 * 60 * 60 * 1000, 185 + maxAge: 5 * 24 * 60 * 60 * 1000, 186 186 }) 187 187 .redirect(req.query.redirect || "/"); 188 188 } else {