Hi I have an api that takes sessionHandle as an ap...
# general
k
Hi I have an api that takes sessionHandle as an api and revoke that session But the frontend is still able to surpass the auth guard and access our apis How to handle that ? I am using nest js
r
it's cause the access token is stateless
k
How to modify the api to logout the user ?
k
Thanks But here comes another error : Error: Cannot set headers after they are sent to the client Using guard provided in the nestjs documentation https://supertokens.com/docs/session/nestjs/guide#7-add-session-verification-guard
r
Have you followed our nestjs guide properly? With the error handler and stuff?
k
Yes
The issue is that I am also using my custom exception filter that handles all other errors And the auth guard sets some headers if session get expired I dont want to set any headers How to modify verifySesion code or how to merge the code to avoid setting headers
2 Views