Earn 2,250 ($22.50)
Fix session handling in auth.ts and routes.ts while maintaining the existing security architecture
Bounty Description
Problem Description
Users must login twice to successfully authenticate. The first login attempt fails silently, requiring a second attempt to complete the authentication process. This happens despite successful session creation and cookie storage. The issue appears to be related to session handling between the React frontend and Express backend.
Acceptance Criteria
User should only need to login once
Session should persist correctly after first login
Login flow should properly handle session creation and cookie storage
No silent failures in the authentication process
Solution should maintain existing security measures
Technical Details
Frontend: React with TypeScript
Backend: Express.js
Authentication: Passport.js with local strategy
Session Storage: PostgreSQL with connect-pg-simple
Current session config uses:
resave: false
saveUninitialized: false
Cookie settings: httpOnly, sameSite: 'lax'
Issue appears in session handling between login success and redirect
Link to Project
https://sonaragent.replit.app/