Invalidate resources on logouot
Hi, I jsut started creating an app and don't know the best way to fix this. Here is my scenario:
1. User A logs in
2. User A fetches a list of posts from his account
3. User A logs out
4. Without refreshing the page
5. User B logs in
6. While User B is fetching his list of posts, previous user A Posts are visible
Shouldn't all resources be invalidated on log out?
How can I invalidate all on logout? the useInvalidate hook cannot be called in the auth provider logout because it is not a react component
Thank you very much in advance
1. User A logs in
2. User A fetches a list of posts from his account
3. User A logs out
4. Without refreshing the page
5. User B logs in
6. While User B is fetching his list of posts, previous user A Posts are visible
Shouldn't all resources be invalidated on log out?
How can I invalidate all on logout? the useInvalidate hook cannot be called in the auth provider logout because it is not a react component
Thank you very much in advance
