authjs-nuxt
authjs-nuxt copied to clipboard
getServerSession returns object, getServerToken returns null
Environment
Local/production
Reproduction
https://github.com/hunter-isaiah96/mylinx/tree/authjs-module
Describe the bug
I'm trying to get the JWT token in a middleware authentication function, but getServerToken returns null. I have session.strategy set to jwt. Getting the session data works fine. Any known reason why that may be?
Additional context
No response
Logs
No response
This could be a bug. Does this block you ?
Hey, I saw that you've fixed this. When I tackle back onto this project, I will test the fix. Sorry for the late response, been working on other projects.
getServerToken also returns null in server routes
This also might be interesting... : https://github.com/Hebilicious/authjs-nuxt/issues/160
Something wrong with response.headers
in getServerToken
. Setting event.headers
to req.headers
for getToken
params resolves this issue.