Issue with setTokenManager Server Middleware Not Working Properly in Vercel Deployment #587
Labels
bug
A bug that needs to be resolved
closed-by-bot
Closed by automation
needs-reproduction
Action needed: A valid reproduction of the issue needs to be added
Environment
No response
Reproduction
No response
Describe the bug
Title: Issue with
setTokenManager
Server Middleware Not Working Properly in Vercel DeploymentDescription:
Environment:
{
"name": "nuxt-app",
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxt/devtools": "latest",
"@nuxtjs/google-fonts": "^3.0.2",
"@sidebase/nuxt-auth": "^0.6.0-rc.0",
"@types/node": "^18.17.3",
"autoprefixer": "^10.4.14",
"nuxt": "^3.7.1",
"nuxt-api-party": "^0.20.0",
"nuxt-icon": "^0.5.0",
"postcss": "^8.4.27",
"tailwindcss": "^3.3.3"
},
"dependencies": {
"@nuxt/image": "^1.0.0-rc.2",
"@pinia/nuxt": "^0.4.11",
"@vueup/vue-quill": "^1.2.0",
"jsonwebtoken": "^9.0.2",
"mobile-detect": "^1.4.5",
"next-auth": "^4.21.1",
"nuxt-swiper": "^1.2.2",
"nuxt3-select2": "^0.1.29",
"ofetch": "^1.3.3",
"pinia": "^2.1.6"
},
"overrides": {
"vue": "latest"
}
}
Problem:
I have deployed my Nuxt.js project on Vercel and am encountering an issue with my
setTokenManager
server middleware, which is not functioning as expected. In my local environment, everything works fine, but in the Vercel deployment, thetoken
is returned asnull
.Code Snippet:
Issue Details:
getToken
function, when invoked, doesn't retrieve the expected token. Instead, it returnsnull
.event
.Troubleshooting Done:
setCookie
function.Additional Context:
Here is the console output of the
event
object:The text was updated successfully, but these errors were encountered: