DEV Community

Discussion on: Secure authentication in Nuxt SPA with Laravel as back-end

 
stefant123 profile image
StefanT123

I never tested it like that, but I use SSR only for SEO optimization, so if some content needs authentication, then in my case it doesn't need to be server-side rendered. But I have an idea how to get it to work, I'll try it as soon as I can.

Thread Thread
 
jes490 profile image
Aleksey Sesyolkin

Hmm, you're right actually... It doesn't make much sense to use asyncData() on auth pages.

But it would be nice to hear your idea about this case anyway )

Thread Thread
 
harsha935 profile image
Harsha Sampath • Edited

Hi, I'm exactly stuck in this scenario. In this post Laravel httpOnly cookie is useless. because the author saving a cookie in frontend instead of using that httpOnly cookie. Ofcause, the author can't! Because when calling client-side HTTP request, httpOnly cookie which server sent, does not persistently save in the browser. Nuxt also cannot create httpOnly cookie even if it running on NodeJs! I have search about this issue and Nuxt authors are not capable to do that. github.com/nuxt-community/auth-mod...