Hello,
I encountered a problem with my realm setup. For some reason the user gets logged out if he closes the app while being offline. But I want him to stay logged in all the time until he logs out manually.
I use flexible sync and I wrap the RealmProvider by AppProvider as well as UserProvider.
My code looks like this:
const realmFileBehavior = {
type: "downloadBeforeOpen",
timeOut: 1000,
timeOutBehavior: "openLocalRealm"
}
<AppProvider id="...">
<UserProvider fallback={<SignIn />}>
<RealmProvider sync={{
flexible: true,
existingRealmFileBehavior: realmFileBehavior,
newRealmFileBehavior: realmFileBehavior
}}>
...
</RealmProvider>
</UserProvider>
</AppProvider>
If I restart the app while being offline the SignIn component is displayed. So I assume that the UserProvider can’t get the user. But I want the user to be logged in until he logs out regardless of internet connection. Is that possible?
Best