fix: Resolve login routing conflicts and network connection errors

- Redirect old /login route to /login-new to prevent conflicts
- Update logout API to redirect to /login-new instead of /login
- Fix network connection errors caused by inconsistent login URLs

This resolves the "Failed to load resource: The network connection was lost"
error that occurred when browsers tried to access the old login route.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-14 17:56:27 -06:00
parent aae836f351
commit b07ee8cdff
2 changed files with 3 additions and 6 deletions

View File

@@ -6,5 +6,5 @@ export const POST: APIRoute = async ({ cookies, redirect }) => {
await supabase.auth.signOut();
return redirect('/login', 302);
return redirect('/login-new', 302);
};

View File

@@ -1,9 +1,6 @@
---
import LoginLayout from '../layouts/LoginLayout.astro';
import { generateCSRFToken } from '../lib/auth';
// Generate CSRF token for the form
const csrfToken = generateCSRFToken();
// Redirect to the new login page
return Astro.redirect('/login-new');
---
<LoginLayout title="Login - Black Canyon Tickets">