getServerSession() returns null on server middleware
Hi,
inside of server/middleware/auth.ts returns null on same cases. There was a warning about it and recommended solution was to pass cookies to headers and i have already applied it during any request. But still, especially on page refresh, session returns null.
Also, i realized that if there is a async fetch call inside of any .vue component's onMounted() method, this middleware is called. Ex: if there are 4 calls it is called 4 times even if i dont mount that page.
Any recommendations to overcome this issue?
inside of server/middleware/auth.ts returns null on same cases. There was a warning about it and recommended solution was to pass cookies to headers and i have already applied it during any request. But still, especially on page refresh, session returns null.
Also, i realized that if there is a async fetch call inside of any .vue component's onMounted() method, this middleware is called. Ex: if there are 4 calls it is called 4 times even if i dont mount that page.
Any recommendations to overcome this issue?
