thejaskiranps
09/16/2023, 8:11 AMSession.getSession(context.req, context.res)
fails in getServerSideProps()
with the error:
SessionError: Session does not exist. Are you sending the session tokens in the request with the appropriate token transfer method?
at Object.<anonymous> (/var/task/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:192:27)
at Generator.next (<anonymous>)
at /var/task/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:66:75
at new Promise (<anonymous>)
at __awaiter (/var/task/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:48:16)
at Object.getSession (/var/task/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:172:20)
at Object.<anonymous> (/var/task/node_modules/supertokens-node/lib/build/recipe/session/sessionRequestFunctions.js:145:51)
at Generator.next (<anonymous>)
at /var/task/node_modules/supertokens-node/lib/build/recipe/session/sessionRequestFunctions.js:30:75
at new Promise (<anonymous>) {
type: 'UNAUTHORISED',
payload: { clearTokens: false },
errMagic: 'ndskajfasndlfkj435234krjdsa',
fromRecipe: 'session'
}
It works locally, but not in production.
NextJS frontend app is hosted on vercel &
node/fastify server is hosted on aws apprunner
Tried updating supertokens to the latest version