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

It appears you’re facing authentication and session management issues in your Nuxt 3 application when using Node.js version 18, despite the requirement for Node.js 18 by Nuxt 3. Users are being logged out upon page refresh, and the JWT cookie is disappearing. Despite efforts to adjust SameSite and CORS settings, the problem persists. Compatibility issues may exist dg dollar general between Nuxt 3, Node.js 18, and your authentication setup. Seeking assistance from the Nuxt and Strapi communities or checking for updates addressing compatibility issues could help resolve the problem. Consider temporarily reverting to Node.js 16 if needed while a solution is found.