11 lines
297 B
TypeScript
11 lines
297 B
TypeScript
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();
|
|
}
|
|
});
|