Solved on my own 🥳
Hi there! I'm working with the
supertokens-node
SDK and a Fastify Mercurius GraphQL server. Having issues getting our context setup and would love some help. I'm using a request from Postman that has the correct
I was about to get it working by using Session.getSessionWithoutRequestResponse but would still expect the usage in the docs to work correctly.
Does this other method still handle refreshing the token correctly and such? Or is that separate
arimgibson
01/08/2024, 10:32 PM
Sorry I just wanted to get the issue posted here, still going through and debugging with VSCode's debugger. Also turned debugging on and got this:
2024-01-08T22:31:05.221Z com.supertokens {t: "2024-01-08T22:31:05.220Z", message: "getSession: returning undefined because accessToken is undefined and sessionRequired is false", file: "*path*/node_modules/.pnpm/supertokens-node@16.6.5/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:140:30" sdkVer: "16.6.5"}
arimgibson
01/08/2024, 10:45 PM
95% sure at this point that the error is because our Supertokens is setup to use the Cookie auth method, but we're trying to authenticate our test GraphQL requests using headers
arimgibson
01/08/2024, 11:06 PM
Yep that was part of it; other part was not using right header auth scheme. All solved now! :)
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).