NuxtN
Nuxt4mo ago
8 replies
Hituro

useUserSession() blank for one user

I am using nuxt-auth-utils to manage login and authentication in an app. When the user logs in we store data in
user
using
setUserSession()
and then check some of those values in the authentication middleware. This appears to work fine ... except for one user.

For that user, we run
setUserSession()
on the server side, but when we then request the session with
useUserSession()
their session is blank. This happens regardless of whether I refresh the session with refresh or not. It feels like the session is simply not saved on the server side, or not passed to the client even after a refresh and route change.

I have been wondering if the total size of the stored data (including the secure part) could have any impact on whether the session saves or not, and whether that's something we can alter?
Was this page helpful?