Do I need to do anything special to make the refre...
# support-questions
v
Do I need to do anything special to make the refresh token work with graphql? signin works just fine, but once the access token expires apollo just errors out. I tried adding an error handler and manually calling SuperTokens.attemptRefreshingSession(), but even then it does not work. Standard get/post requests work just fine. Am I missing something?
n
Hey, do you see any specific network errors?
v
No. attemptRefreshingSession returns true. It feels like apollo just doesn't use the new cookie. It should be set automatically, right?
This is just strange. If I put getAccessTokenPayloadSecurely into the graphql error handler, it can get the payload just fine. So clearly the refresh token works, just not for the apollo client.
I'm losing my mind. If I refresh the token and then fetch a random http endpoint that is guarded, the graphql client will start working again. This narrows the actual source of the error down quite a bit, but I'll figure it out later
n
Can you post some code of how you initialised SuperTokens on the frontend and backend?
2 Views