feat: Implement user authentication, admin user management, and role-based access control.

This commit is contained in:
Missez 2026-01-16 16:37:16 +07:00
parent 8a2ca592bc
commit 38648581ec
19 changed files with 1762 additions and 514 deletions

View file

@ -0,0 +1,11 @@
export default defineNuxtPlugin({
name: 'auth-restore',
parallel: false,
setup() {
const authStore = useAuthStore();
// Restore auth state from cookies on app initialization
// useCookie works on both server and client
authStore.checkAuth();
}
});

View file

@ -1,8 +0,0 @@
export default defineNuxtPlugin(() => {
const authStore = useAuthStore();
// Restore auth state from localStorage before any navigation
if (process.client) {
authStore.checkAuth();
}
});