Browse Source

extending cookie validity for post.porkna to 48hr

master
Rich Brown 9 months ago
parent
commit
7532b54f72
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/funcs.js

+ 2
- 1
src/funcs.js View File

@@ -15,7 +15,8 @@ export const isMicropubTokenAuthed = (req, res, next) => {
// eslint-disable-next-line camelcase
const { issued_at } = decodedValue;
const now = Date.now() / 1000;
const twoHours = 60 * 120;
// TODO: TOO SHORT, 8/23/2019 i'm changing to 2 days, not 2 hours, using * 24
const twoHours = 60 * 120 * 24; // twoDays tho
// eslint-disable-next-line camelcase
if (now - twoHours > issued_at) {
// req.session.token = null; // TODO: uneccessary right?


Loading…
Cancel
Save