[Adonis 4.1]Decrypt cookie or session in socket.io middleware to access the user credentials #1408
Unanswered
tayfunakgc
asked this question in
Help
Replies: 1 comment 1 reply
-
Which version of the framework? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Socket.io provider.
Users connect to the socket in some pages and I can get their cookies easily. (socket.handshake.headers.cookie)
JSON output of cookie:
But the problem is parsing the cookie to check the user.
I tried to decrypt the data. But it returns null; (I thought I can access with Encryption.decrypt())
So is there any way to do this? How can I check the user without HTTP ctx?
Beta Was this translation helpful? Give feedback.
All reactions