# Customizing Polling Behavior in useUser Hook

**URL:** <https://community.auth0.com/t/customizing-polling-behavior-in-useuser-hook/193002>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, nextjs-auth0\
**Created:** [October 9, 2025, 12:00pm UTC](https://community.auth0.com/t/customizing-polling-behavior-in-useuser-hook/193002 "2025-10-09T12:00:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yazan-Ali9](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yazan-ali9/32/76964_2.png) [@Yazan-Ali9](https://community.auth0.com/u/Yazan-Ali9)\
**Post date:** [October 9, 2025, 12:00pm UTC](https://community.auth0.com/t/customizing-polling-behavior-in-useuser-hook/193002/1 "2025-10-09T12:00:20Z")

</div>

I’m currently using the `useUser` hook from the Auth0 Next.js SDK in my application. Upon reviewing the SDK’s documentation and source code, I’ve observed that the hook utilizes `useSWR` internally to fetch user data from the `/auth/profile` endpoint. This setup introduces polling behavior, as `useSWR` periodically re-fetches data to keep it up-to-date.

However, the SDK does not provide a direct way to customize the polling behavior via the `useUser` hook. I’m seeking guidance on how to manage polling behavior, such as adjusting the refresh interval or disabling polling, to optimize network requests and application performance.

**Steps to Reproduce:**

1. Install the Auth0 Next.js SDK.

2. Use the `useUser` hook in a component.

3. Observe the network requests to the `/auth/profile` endpoint.

**Expected Behavior:**

The ability to customize the polling behavior of the `useUser` hook, including adjusting the refresh interval or disabling polling, to optimize network requests and application performance.

**Actual Behavior:**

The SDK does not provide a direct way to customize the polling behavior via the `useUser` hook.

**Environment:**

- Auth0 Next.js SDK version: ^4.9.0

- Next.js version: 15.5.2

**Additional Context:**

Customizing the polling behavior is crucial for optimizing network requests and application performance, especially in scenarios where user data changes infrequently. Providing a way to manage polling behavior would enhance the flexibility and efficiency of the SDK.

---

<div class="post-metadata">

**Author:** ![teodor.andrei](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/teodor.andrei/32/75320_2.png) [@teodor.andrei](https://community.auth0.com/u/teodor.andrei)\
**Post date:** [October 9, 2025, 12:14pm UTC](https://community.auth0.com/t/customizing-polling-behavior-in-useuser-hook/193002/3 "2025-10-09T12:14:46Z")

</div>

Hi @Yazan-Ali9 and welcome to the Auth0 Community!

You are right that you cannot modify the options passed to the useSWR hook when using the useUser hook so there isn’t much I can help you with there. What I would do is try to create a custom implementation of the useUser hook using the one from the [repo](https://github.com/auth0/nextjs-auth0/blob/88edf0e2f7c1f113c01064c7a3856870baa646bc/src/client/hooks/use-user.ts#L8) as an example.

[Here](https://swr.vercel.app/docs/api#:~:text=found%20here.-,Options,-suspense%20%3D%20false%3A%20enable) is the SWR docs as well, in case you haven’t already found it yourself.

You can also try to create a #feature-request for the options to be added.

I wish you a great day!  
Teodor.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 23, 2025, 12:15pm UTC](https://community.auth0.com/t/customizing-polling-behavior-in-useuser-hook/193002/4 "2025-10-23T12:15:25Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
