This MR fixes critical authentication issues that prevented login on localhost and improves the developer experience with consolidated rebuild scripts and a working help modal keyboard shortcut. #5
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix authentication issues and improve developer experience
Summary
This MR fixes critical authentication issues that prevented login on localhost and improves the developer experience with consolidated rebuild scripts and a working help modal keyboard shortcut.
Problems Fixed
1. Authentication Issues
__Host-and__Secure-prefixes on HTTP (localhost), causing browser rejection2. Help Modal Keyboard Shortcut
3. Developer Experience
useSecureCookiesvariable and misleading commentsChanges Made
Authentication Fixes (
lib/auth.ts)trustHost: trueto fix UntrustedHost error (required for NextAuth v5)secure: falsefor HTTPuseSecureCookiesvariableHelp Modal Fix (
components/HelpModal.tsx)Developer Scripts
CLEAN_REBUILD.sh,FIX_AND_RESTART.sh, andstart-server.shinto singlerebuild.shCode Cleanup
useSecureCookiesvariable fromlib/auth.tsapp/api/auth/[...nextauth]/route.tsTechnical Details
Cookie Configuration
The fix works by explicitly configuring cookies for HTTP environments:
secure: falseThis prevents NextAuth v5 from auto-detecting HTTPS from proxy headers and incorrectly adding cookie prefixes.
Keyboard Shortcut
The question mark key requires Shift+/ on most keyboards. The fix now properly detects:
event.shiftKey && event.key === "/"event.key === "?"(fallback)event.code === "Slash" && event.shiftKey(additional fallback)Testing
Files Changed
Modified
lib/auth.ts- Authentication configuration fixescomponents/HelpModal.tsx- Keyboard shortcut fixapp/api/auth/[...nextauth]/route.ts- Removed misleading commentAdded
rebuild.sh- Consolidated rebuild scriptREBUILD.md- Rebuild documentationMigration Notes
No database migrations or environment variable changes required. The fix works with existing configuration.
Related Issues
Fixes authentication issues preventing local development and testing.