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