RocketChat / EmbeddedChat

An easy to use full-stack component (ReactJS) embedding Rocket.Chat into your webapp
https://www.npmjs.com/package/@embeddedchat/react
107 stars 214 forks source link

fix/feat: Improve auto login + loading screens #594

Closed Spiral-Memory closed 5 days ago

Spiral-Memory commented 1 week ago

Brief Title

In this PR, I have restructured the way auto-login works. Previously, it was implemented within the EmbeddedChat component, directly interacting with the authentication package and managing state. Now, I have moved this functionality to EmbeddedChatAPI. This change allows EmbeddedChat to interact with EmbeddedChatAPI to handle auto-logins more effectively as side effects. This restructuring has enabled better management of auto-login states, facilitating the display of throbbers or custom messages during login or while messages are loading.

Acceptance Criteria Fulfillment

Fixes: N/A

Video/Screenshots

https://github.com/RocketChat/EmbeddedChat/assets/78961432/69df65ff-4760-4fe8-ba08-756a360ee350