perf: add staleTime to third-party auth context query
The TPA context is effectively static per session. Adding a 5-minute staleTime prevents unnecessary background refetches when navigating between login/register tabs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Adolfo R. Brandes
parent
fc40952da3
commit
bb3ab6cba4
@@ -10,6 +10,7 @@ const useThirdPartyAuthHook = (pageId, payload) => useQuery({
|
||||
queryKey: ThirdPartyAuthQueryKeys.byPage(pageId),
|
||||
queryFn: () => getThirdPartyAuthContext(payload),
|
||||
retry: false,
|
||||
staleTime: 5 * 60 * 1000, // 5 minutes — TPA context is effectively static per session
|
||||
});
|
||||
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user