prototyping passport auth logic

This commit is contained in:
Mikayla Dobson
2022-11-21 10:57:37 -06:00
parent aaf71bc4f7
commit 1b08598799
10 changed files with 427 additions and 534 deletions

13
server/db/sessionStore.ts Normal file
View File

@@ -0,0 +1,13 @@
import connectPgSimple from 'connect-pg-simple';
import session from 'express-session';
import pool from ".";
export default function pgSessionStore(s: typeof session) {
const pgSession = connectPgSimple(s);
return new pgSession({
pool: pool,
tableName: "pgsessions",
createTableIfMissing: true
})
}