Open tomoyuki28jp opened 5 years ago
Ran into this as well.
@tomoyuki28jp try including this to your rrfConfig
. This should make sure that profile and auth data is not cleared.
const rrfConfig = {
preserveOnLogin: { auth: true, profile: true },
...config,
}
@prescottprue The TS types on the config could be updated. Is there any pending issue / PR for this as far as you are aware?
@davedc no I don’t believe that is, but yes it would be great to have them as accurate as possible. Feel free to open an issue explaining what is out of sync, or a PR with the changes if you get a chance.
Thanks for reporting and noting the workaround. I think making this more clear in the docs could mean we can close this
What is the current behavior?
I am using react-redux-firebase + redux-persist.
persist/REHYDRATE
restores firebase.profile from localStorage@@reactReduxFirebase/LOGIN
clears firebase.profile@@reactReduxFirebase/SET_PROFILE
re-set latest profile dataWhat is the expected behavior?
In the above case, I think it's better not to clear firebase.profile before getting the latest data. (I am really new to react, so I might be wrong.)
Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?