From 3c7d15d6b082308c11ec9777e912830efa30830a Mon Sep 17 00:00:00 2001 From: spliceboti <44727389-spliceboti@users.noreply.replit.com> Date: Fri, 12 Sep 2025 20:15:12 +0000 Subject: [PATCH] Allow database to create tables if they are missing Update pgStore configuration in replitAuth.ts to set createTableIfMissing to true to resolve authentication issues. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 3a22ac80-cd1d-4441-9e36-f24fc2f4c3de Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3478f7c3-db8c-4fca-9165-3adbdf1b5829/3a22ac80-cd1d-4441-9e36-f24fc2f4c3de/gBqmpbl --- .replit | 4 ++++ server/replitAuth.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.replit b/.replit index 51f344f..16867d4 100644 --- a/.replit +++ b/.replit @@ -14,6 +14,10 @@ run = ["npm", "run", "start"] localPort = 5000 externalPort = 80 +[[ports]] +localPort = 35473 +externalPort = 3000 + [workflows] runButton = "Project" diff --git a/server/replitAuth.ts b/server/replitAuth.ts index efd046c..6ef6585 100644 --- a/server/replitAuth.ts +++ b/server/replitAuth.ts @@ -27,7 +27,7 @@ export function getSession() { const pgStore = connectPg(session); const sessionStore = new pgStore({ conString: process.env.DATABASE_URL, - createTableIfMissing: false, + createTableIfMissing: true, ttl: sessionTtl, tableName: "sessions", });