elearning/frontend_management/plugins/auth.ts

9 lines
212 B
TypeScript
Raw Normal View History

2026-01-14 13:58:25 +07:00
export default defineNuxtPlugin(() => {
const authStore = useAuthStore();
// Restore auth state from localStorage before any navigation
if (process.client) {
authStore.checkAuth();
}
});