prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 556 forks source link

Improve Description Of enableCLaims refreshToken #967

Open DavidConstantine88 opened 4 years ago

DavidConstantine88 commented 4 years ago

Hi guys, I want to suggest an enhancement to the documentation.

It seems like the description

"Note: If a claim is added to a user who is already logged in those changes will not necessarily be propagated to the client. In order to assure the change is observed, use a refreshToken property in your userProfile collection and update it's value after the custom claim has been added. Because react-redux-firebase watches for profile changes, the custom claim will be fetched along with the refreshToken update." from http://react-redux-firebase.com/docs/auth

Is quite confusing...

As it seems like no matter which value will be changed in the profile the token will be reloaded automatically... for example you could create blablabla property in Firestore with timestamp now - the point something need to change and thats all...

And I thought from the documentation that this refreshToken suppose to be some special value and searched long time for its exact format - only reading the src/auth.js of react-redux-firestore made me figure it out :(

prescottprue commented 4 years ago

Open to changes if you get a chance to make a PR, if not I will see when I can get to it. Thanks for reaching out!