How can I check if a user is logged in or not in socket.io with AdonisJS session csrf #4646
-
There isn't much information about this. Is there a way to check if a user is logged in with AdonisJS V6 and socket.io? I have this code so far, but I can't verify if the user has logged in with CSRF session. Is there also a way to use middleware with socket.io? start/socket.ts
UsersController:
react:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I have the same problem -_- |
Beta Was this translation helpful? Give feedback.
-
AdonisJS V6 after a lot of research, the solution is as follows: You can use this repository which includes the connection but through the API with an access token. This will solve the auth issue, but I hope the developers of AdonisJS will support this matter themselves and create solutions for this problem and improve their documentation. Link GitHub: Adonis chat demo Connection method:
|
Beta Was this translation helpful? Give feedback.
AdonisJS V6 after a lot of research, the solution is as follows: You can use this repository which includes the connection but through the API with an access token. This will solve the auth issue, but I hope the developers of AdonisJS will support this matter themselves and create solutions for this problem and improve their documentation.
Link GitHub: Adonis chat demo
Connection method: