getUserIdentity from inside a query
hey all 👋 , I have a query that is in a component wrapped in an auth gate. the Auth gate checks for authentication status and only then does it render the component with the query. However, looking at the logs, it looks like the query fires twice once the query handler can get the user Identity through
ctx.auth.getUserIdentity
but another time calling ctx.auth.getUserIdentity
return null.
here is my auth gate component
and the code for the query handler
2 Replies
Hey @fawwaz the code you shared looks correct. Is it possible that the query is called from somewhere else than the gated component?
hey @Michal Srb thanks a bunch it turns out indeed the somewhere else the request was firing, all good now 🙂