Having previously worked with Vuejs, I decided to explore NuxtJs. In my past projects, my server would send a HttpOnly cookie that my client couldn't access. When trying out NuxtAuth for authentication strategies, I realized using a HttpOnly cookie was not possible due to the limitations of SSR. I found a workaround by only running API requests on the Client-Side where the cookie could be accessed. While this solution works, I believe there may be a better way to handle this.
Additionally, I am struggling with setting up axios for development and production environments in the nuxt.config file. When setting the baseURL attribute, I encountered CORS issues. Using a proxy resolved the issue, but cookies were rejected with an error message about invalid domain rights. I suspect this is because the proxy is localhost in the development environment. Is there a solution for this problem?
Does anyone have suggestions on how to implement HttpOnly authentication in Nuxt?