-
Nuxt.js
Discontinued Nuxt is an intuitive and extendable way to create type-safe, performant and production-grade full-stack web apps and websites with Vue 3. [Moved to: https://github.com/nuxt/nuxt]
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Your user hits the refresh button on his/her browser. This turns into a server-side process called process.server on the endpoint "/profile" - reloading the browser tab should reset everything, so this possibly puts the user in an "unauthenticated state" - with the exception that your browser still having the cookie set. Then, all go through the rendering process again by calling the middleware (which can and should access this cookie) and setting the axios headers correctly. Run through asyncData() again, check that auth is set, then the user can see his/her profile page again.
Also, someone created a package to read both client and server cookies you should look into.
I think the others have already answered your question for you, I just wanted to add that you might want to look into nuxt-auth which handles authentication on frontend and it sets up all the necessary middleware to do what you need.