graasp / graasp-query-client

GNU Affero General Public License v3.0
1 stars 0 forks source link

Websockets are not updated after Authentication #832

Open Defferrard opened 1 month ago

Defferrard commented 1 month ago

After an authentication (By example Item Login), the websocket is not updated.

How to reproduce ?

  1. Create an account (bob@graasp.org)
  2. Create an Item
  3. Allow pseudonimized authentication on the Item
  4. Log on the Item with an pseudonimized account (alice)
  5. Send a message on the chat box with alice
  6. The chatbox is not updated on alice's computer <-- this is the issue.
  7. Reload page with alice
  8. Send a message on the chat box with alice
  9. The chatbox is updated on alice's computer
spaenleh commented 1 month ago

A bit more information on the issue and where to fix it.

We need to supply the websocketClient instance created in the configureQueryClient to the setup functions of the itemLogin mutations.

We need to add a reset method on the websoketClient that will reconnect to the server with the new credentials. This needs to be done in @graasp/sdk.