Hi all,
I have a Nuxt 3 frontend and Django backend deployed on DigitalOcean App platform. Authentication is implemented using HttpOnly cookies, and the application works correctly locally. However, in the production environment, when a user refreshes the page, there is a slight delay during which it appears as though the user is not logged in.
// /plugins/auth.ts
import { useAuthUser } from "../composables/useAuthUser"
export default defineNuxtPlugin(async () => {
const user = useAuthUser()
if(!user.value) {
const { fetchUser } = useAuth();
await fetchUser();
}
});
Tested with Node.js versions 16.x and 20.x. The issue persists with both versions.
"engines": {
"node": "20.x"
}
Thank you for any insights or suggestions provided.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!