-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed as not planned
Description
Environment
middleware
Reproduction
middleware
Describe the bug
When I reload the page, it throws me to the authorization page, although the user is authorized
import { useAuthStore } from '~/store/auth';
export default defineNuxtRouteMiddleware(async () => {
const { loggedIn } = useAuthStore();
if (!loggedIn) {
return navigateTo('/auth');
}
});
Additional context
No response
Logs
No response
peidrao, pimboden, Mohammad-Ravand, IloveNooodles, KresimirCosic and 1 more