atinux / nuxt-auth-utils

Add Authentication to Nuxt applications with secured & sealed cookies sessions.
MIT License
973 stars 91 forks source link

Curious about server plugin #291

Open targetlucked69 opened 1 day ago

targetlucked69 commented 1 day ago

Hi @atinux! Sorry for tagging you here, tried to open a discussion item but it's not enabled. I just have a question about this block of code:

Screenshot 2024-11-20 at 8 30 30 AM

What is the purpose of serverRendered, prerenderedAt, and isCached here? I dont see any documentation related to them. Couldnt you just do something like:

if (import.meta.server) {
  await useUserSession().fetch()
}

Thanks for this awesome module!