Open nikkothari22 opened 2 years ago
This is very nice feature. Hope this will available soon
I'm looking forward to seeing it, Hope it will be released soon.
first of alll , tks for your big effort on frappe-js-sdk,
I have also tried to build it myself and consulted with @Build With Hussain. The suggestion given was to integrate with frappe-ui. However, when it comes to integrating it with my own Vue project, I still don't fully understand the authorization part. The issue has been stuck at "message":"Unauthorized: Error: Not Found".
@Build With Hussain provided the integration process for frappe-ui. https://github.com/frappe/frappe-ui/blob/main/src/utils/socketio.js
However, it seems that this only supports authorization using username and password, and it cannot be used with tokens.
Therefore,@nikkothari22 it is suggested to open up the idea so that everyone can share and improve the integration of socketio in frappe-js-sdk.
@guinanlin
Frappe only supports cookie based authentication for socket connections as far as I know. So adding support for API key based authentication for socket needs to be done in the Frappe framework (backend). We already have socket connections on frappe-react-SDK and they only work for cookie based auth as well.
@guinanlin
Frappe only supports cookie based authentication for socket connections as far as I know. So adding support for API key based authentication for socket needs to be done in the Frappe framework (backend). We already have socket connections on frappe-react-SDK and they only work for cookie based auth as well.
As per docs it supports token based auth also
Is your feature request related to a problem? Please describe. Since Frappe supports realtime socket communication via SocketIO, we can add support for the same.
Describe the solution you'd like We need the following:
getDoc
) or queries (lists - coupled withgetDocList
). This would allow developers to always get the latest value from the database whenever the socket event is fired. We can even give the ability to listen to a different event (instead ofupdate_doc
) and fetch the latest value.