Fix login authentication flow and improve proxy configuration
All checks were successful
Build And Push Image / docker (push) Successful in 2m50s
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:
@@ -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: '/',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user