__jono
03/05/2024, 10:53 PMError getting session SessionError: Session does not exist. Are you sending the session tokens in the request with the appropriate token transfer method?
Turning on the debug config, we also get this error
com.supertokens {t: "2024-03-05T22:43:22.683Z", message: "getSession: UNAUTHORISED because accessToken in request is undefined",
One other line that jumps out is
message: "session init: cookieDomain: undefined", file: "/var/task/node_modules/supertokens-node/lib/build/recipe/session/recipe.js:173:18" sdkVer: "16.7.4"}
Logging the request, I can see the cookie is being set on the header.
This is our nextjs backend config
export const backendConfig = (): TypeInput => {
return {
appInfo: {
appName: '**',
apiDomain: '**',
apiBasePath: '/auth',
websiteDomain: '**',
},
framework: 'express',
isInServerlessEnv: true,
recipeList: [
SessionNode.init(),
PasswordlessNode.init({
flowType: 'USER_INPUT_CODE',
contactMethod: 'EMAIL_OR_PHONE',
}),
],
supertokens: {
connectionURI: configLoader.get('SUPER_TOKENS_CONNECTION_URI'),
apiKey: configLoader.get('SUPER_TOKENS_API_KEY'),
},
debug: true,
}
}
Our authentication works fine still client side but having server side issues. Any help would be great.