How would a middleware work in the case of a WebSo...
# support-questions-legacy
w
How would a middleware work in the case of a WebSocket connection ? I can't get my head around this as the only solution I find in the doc is related to the
verifySession
which is directly related to the
express
framework ! Is there a way I can just validate the
sAccessToken
from my Cookie ?
r
hey @whatsappxthomas
you can enable JWTs with sessions, and pass the JWT in your socket connection. You can then verify the JWT using any standard jwt verification lib on the backend.
w
OK thanks TBH, I am a bit disappointed there is no solution outside the JWT one!
r
yea i mean.. web sockets don't use cookies etc.. So there is not much of a choice here
3 Views