v0.3.24: revert redis session management change#948
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Greptile Summary
This PR reverts Redis-based session management functionality that was introduced in PR #934 due to Socket.IO authentication failures. The changes remove the Redis secondary storage implementation from the authentication system and restore the original fixed session configuration values.
In apps/sim/lib/auth.ts, the PR removes the conditional secondaryStorage configuration that used Redis for session data storage with get/set/delete operations. The session configuration is reverted to use fixed timing values: 24-hour cookie cache, 30-day expiration, 24-hour update age, and 1-hour fresh age. This replaces the dynamic session timing that was previously adjusted based on Redis availability.
In apps/sim/lib/env.ts, the comment for the REDIS_URL environment variable is updated to remove the "(optional - improves performance)" description, indicating that Redis is now used only for general caching rather than as an optional session management optimization.
The Redis session management was originally implemented to improve performance by reducing database polling for session data and providing faster session lookups. However, this optimization created compatibility issues with the Socket.IO authentication flow, causing real-time connection failures. Since Socket.IO functionality appears to be core to the application's real-time features, the team prioritized fixing the authentication issue over maintaining the performance enhancement. The revert restores the proven stable session management approach using the default better-auth storage mechanism (likely database-based) while allowing time to investigate and resolve the Redis-Socket.IO integration issues separately.
Confidence score: 5/5
- This PR is extremely safe to merge with minimal risk as it reverts problematic functionality back to a known stable state
- Score reflects that this is a straightforward revert of recent changes that were causing authentication failures, restoring proven working code
- No files require special attention as both changes are simple reverts with clear intent
2 files reviewed, no comments
v0.3.24: revert redis session management change
Summary
Reverting redis session management changes here #934 since Sockets auth is failing for unknown reason.
Type of Change
Testing
Tested using ngrok + staging.
Checklist