Authentification fonctionnelle via security.lions.dev
This commit is contained in:
@@ -12,6 +12,7 @@ import { StyleClass } from 'primereact/styleclass';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useDevAuth } from '../auth/DevAuthProvider';
|
||||
import Link from 'next/link';
|
||||
import { redirectToLogin } from '@/lib/auth';
|
||||
|
||||
interface AppLayoutProps {
|
||||
children: React.ReactNode;
|
||||
@@ -114,7 +115,7 @@ export const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
|
||||
icon: 'pi pi-sign-out',
|
||||
command: () => {
|
||||
logout();
|
||||
window.location.href = '/api/auth/login';
|
||||
redirectToLogin();
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user