-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Realm React
-
2 - S (<= 1 week)
-
5385
How frequently does the bug occur?
Always
Description
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 React Native, 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
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
11.3.1
What services are you using?
Atlas App Services: Functions or GraphQL or DataAPI etc
Are you using encryption?
No
Platform OS and version(s)
iOS 15
Build environment
Which debugger for React Native: ..
Cocoapods version
No response