Fix login authentication flow and improve proxy configuration
All checks were successful
Build And Push Image / docker (push) Successful in 2m50s

- Refactor login page to use auth composable for better state management
- Update nginx proxy settings with proper timeouts and buffering
- Improve PWA service worker caching strategy for API calls
- Add debug files and documentation for login troubleshooting
This commit is contained in:
2025-08-07 12:55:15 +02:00
parent 57428f437c
commit 2c545dcaaa
6 changed files with 363 additions and 28 deletions

View File

@@ -234,10 +234,10 @@ export default defineEventHandler(async (event) => {
// Create session with appropriate expiration
const sessionManager = createSessionManager();
const cookieDomain = process.env.COOKIE_DOMAIN || undefined;
const maxAge = !!rememberMe ? 60 * 60 * 24 * 30 : 60 * 60 * 24 * 7; // 30 days vs 7 days
console.log(`🍪 Setting session cookie (Remember Me: ${!!rememberMe}) with domain:`, cookieDomain);
// Don't set a domain for the cookie - let it default to the current domain
console.log(`🍪 Setting session cookie (Remember Me: ${!!rememberMe}) without explicit domain`);
// Create the session cookie string using the session manager
const sessionCookieString = sessionManager.createSession(sessionData, !!rememberMe);
@@ -250,7 +250,6 @@ export default defineEventHandler(async (event) => {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
sameSite: 'lax',
domain: cookieDomain,
maxAge,
path: '/',
});