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:
@@ -6,5 +6,5 @@ export const POST: APIRoute = async ({ cookies, redirect }) => {
|
||||
|
||||
await supabase.auth.signOut();
|
||||
|
||||
return redirect('/login', 302);
|
||||
return redirect('/login-new', 302);
|
||||
};
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user