prototyping passport auth logic
This commit is contained in:
13
server/db/sessionStore.ts
Normal file
13
server/db/sessionStore.ts
Normal 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
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user