Hi all,
I am attempting to incorporate ChatKitty functionalities into my mobile app. I am using Firebase together with ChatKitty.
Currently, I am facing the problem of:
NoActiveSessionError {
"error": "NoActiveSessionError",
"message": "You're not connected to ChatKitty.",
}
which i suspect the user is logged out of ChatKitty after the app is closed. I am using firebase and user is logged out only if the app’s cache is cleared or triggered by the user.
useEffect(() => {
firebase.auth().onAuthStateChanged(async (user) => {
if(!user) {
/** if user is not logged in*/
setIsLoading(false)
setIsLoggedIn(false)
} else {
/** if user is logged in*/
setIsLoading(false)
setIsLoggedIn(true)
};
});
}, []);
I would like to maintain this as I do not want to cause inconvenience to the users by always signing them out.
Is it possible to maintain connection to ChatKitty? Understand that a workaround is to store credentials for ChatKitty in AsyncStorage but also understand that it is not secured. Perhaps is there some session token that I can store to re-connect with ChatKitty and fetch chat info?
Any help is appreciated. Thanks in advance!