elearning/frontend_management/plugins/auth.ts
2026-01-14 13:58:25 +07:00

8 lines
212 B
TypeScript

export default defineNuxtPlugin(() => {
const authStore = useAuthStore();
// Restore auth state from localStorage before any navigation
if (process.client) {
authStore.checkAuth();
}
});