Fix: agregar /api/auth/signin a PUBLIC_ROUTES
Sin esto el middleware redirige a /login antes de entrar al handler, haciendo que el botón "Continuar con Google" cicle contra el propio login sin llegar nunca a Google. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ import { defineMiddleware } from 'astro:middleware';
|
|||||||
import { serverClient } from '@/lib/supabase';
|
import { serverClient } from '@/lib/supabase';
|
||||||
|
|
||||||
const UABC_DOMAIN = '@uabc.edu.mx';
|
const UABC_DOMAIN = '@uabc.edu.mx';
|
||||||
const PUBLIC_ROUTES = ['/login', '/api/auth/callback', '/api/auth/signout'];
|
const PUBLIC_ROUTES = ['/login', '/api/auth/signin', '/api/auth/callback', '/api/auth/signout'];
|
||||||
|
|
||||||
export const onRequest = defineMiddleware(async (context, next) => {
|
export const onRequest = defineMiddleware(async (context, next) => {
|
||||||
const supabase = serverClient(context.cookies);
|
const supabase = serverClient(context.cookies);
|
||||||
|
|||||||
Reference in New Issue
Block a user