I am getting the following error: `SessionError: u...
# support-questions-legacy
s
I am getting the following error:
SessionError: using legacy session, please call the refresh API
when following the authorizer docs https://supertokens.com/docs/thirdparty/serverless/with-aws-lambda/authorizer. This is happening when i call the api from my front end. once this happens then the front end calls the refresh token which returns successful, which then causes the endpoint with the authorizer to get called which results in that error again, which causes the refresh api to get called etc. It basically keeps doing that over and over. Nothing has changed front end wise. Without the authorizer if I do
verifySession
in the lambda everything works great.
r
hey @snackdex
are you adding a jwt token or something to the api call from the frontend?
s
no, am i supposed to?
r
you aren't
can i see the request headers of the API call which throws that error?
s
yes
r
and which backend and frontend SDKs are you using? Along with their versions please.
and can i also see the refresh API's request and response headers?
s
headers ^^
r
i would like to see the whole view
not just part of it
s
authorizer lambda: "supertokens-node": "^13.0.2"
r
and frontend SDK?
s
front end: "supertokens-web-js": "^0.4.0",
r
you should update it to ^0.5.0 and then try again
s
ok ok
also when you said "see the whole view" what did you mean?
r
the image above is just part of the cookies
anyway, please update the frontend sdk and try again
s
ok will do
🥰 i got a 200 status code thank you
for anyone that this may help: when i updated supertokens-web-js to 0.5.0 i got logged out and was getting a cors error because i need to update the api gateway headers to also accept:
st-auth-mode
. This also required me to update supertokens-node in the backend to 13.0.2 for the lambda that handles /auth/* requests. No code change was necessary as
supertokens.getAllCORSHeaders()
now includes this as well.