Strapi 4 + Nuxt 3 Auth Problems

I’ve successfully integrated an authentication function into my Nuxt 3 application with Strapi serving as the backend. Everything seems to be running smoothly when I use Node.js 18 with Strapi and Node.js 16 with Nuxt.

However, here’s the issue:

Nuxt 3 requires Node.js version 18 to function properly. Yet, when I set up Node.js version 18, the application keeps logging out whenever a user is authenticated and I make a refresh. Additionally, the jwt_cookie seems to disappear.

I’ve experimented with various solutions, including adjusting the SameSite settings and CORS settings in both Nuxt and Strapi, but unfortunately, none of these attempts have resolved the issue.

Has anyone encountered a similar problem or can offer any insights?

Best Regards,

Mr. Marcel Superman

  • Search the web for similar soulutions but none of them worked for me
  • Read the documentation
  • Asked Chat GPT