Solved on my own 🥳 Hi there! I'm working with t...
# support-questions-legacy
a
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
st-access-token
header set, and have my context setup exactly how recommended in the docs. However, the session always returns undefined https://supertokens.com/docs/thirdpartypasswordless/graphql-integration/backend-setup Sorry for not much initial information... lemme know what's helpful and happy to provide anything I can :)
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
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"}
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
Yep that was part of it; other part was not using right header auth scheme. All solved now! :)
2 Views