feat: implement sequential thinking MCP server with tool handling and logging
All checks were successful
Build And Push Image / docker (push) Successful in 2m53s

This commit is contained in:
2025-08-07 14:58:08 +02:00
parent 5c8bf15956
commit 99772ab62c
6 changed files with 378 additions and 8 deletions

View File

@@ -1,17 +1,29 @@
export default defineNuxtRouteMiddleware((to) => {
export default defineNuxtRouteMiddleware(async (to) => {
// Skip auth for public pages
if (to.meta.auth === false) {
return;
}
// Check if user is authenticated
const authState = useState('auth.state', () => ({
authenticated: false,
user: null,
groups: [],
}));
// Use the same auth system as the rest of the app
const { isAuthenticated, checkAuth, user } = useAuth();
console.log('🛡️ Auth middleware running for:', to.path);
// Ensure auth is checked if user isn't loaded
if (!user.value) {
console.log('🔄 User not loaded, checking auth...');
await checkAuth();
}
if (!authState.value.authenticated) {
console.log('✅ Auth middleware check:', {
isAuthenticated: isAuthenticated.value,
user: user.value?.email
});
if (!isAuthenticated.value) {
console.log('❌ User not authenticated, redirecting to login');
return navigateTo('/login');
}
console.log('✅ Auth middleware passed, allowing access to:', to.path);
});