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.
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 toEmbeddedChatAPI
. This change allowsEmbeddedChat
to interact withEmbeddedChatAPI
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