mute-gold
mute-gold16mo ago

How can I invalidate the data returned by `getIdentity`?

I want to force refetch all data that comes from the useGetIdentity hook, how is this possible?
5 Replies
kapa.ai
kapa.ai16mo ago
Hi @bombillazo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
kapa.ai
kapa.ai16mo ago
---------------------- Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the useGetIdentity documentation (https://refine.dev/docs/api-reference/core/hooks/auth/useGetIdentity) for more information. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
useGetIdentity | refine
useGetIdentity data hook from refine is a modified version of react-query's useQuery for retrieving user data
kapa.ai
kapa.ai16mo ago
<@260960777010151436> kapa.ai is still learning and improving, please let us how it did by reacting below
fascinating-indigo
fascinating-indigo16mo ago
Hey @bombillazo, You can see the query keys on reac-query devtools. So, you can invalidate the useGetIdentity with its query key.
mute-gold
mute-gold16mo ago
Thanks! I saw my issue was related to the cookie setup.