-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
currentUser.profile is not persistent after app restart #3561
Comments
As |
The profile data should be persisted between app restarts - I'm fairly certain I've seen code in OS that does that, so either we're not loading it correctly in OS or there's an issue with how JS is proxying it. |
I just need some way to persist an ID value in the User object that I use to open a realm for the user. I have a multi-tenant app and I partition the realms according to each tenant ID, which I store in the profile data (I use Custom JWT for authenticating), but every time the app restarts the User object loses it's profile data so I can't open a realm with the tenant ID. |
@yourstruly22 It is fixed by #3895 and will be included in the next release. |
@kneth Thank you, I appreciate |
##
GoalsWhen logging in a user I use metadata which is added to their currentUser.profile property which contain their partitionKey values needed to open a realm.
On app.login() the user object contains the profile property which contains all the needed metadata.
After the app is restarted, the user object persists and is still logged in, but the currentUser.profile property is empty.
Expected Results
app.currentUser should persist when the app is restarted, including the profile property.
Actual Results
app.currentUser.profile is empty after app restarts.
Steps to Reproduce
Code Sample
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: