# For how log user is logged in to the application

**URL:** <https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064>\
**Category:** Get Help\
**Created:** [April 4, 2022, 2:08pm UTC](https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064 "2022-04-04T14:08:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandeysumit832](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pandeysumit832/32/24787_2.png) [@pandeysumit832](https://community.auth0.com/u/pandeysumit832)\
**Post date:** [April 4, 2022, 2:08pm UTC](https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064/1 "2022-04-04T14:08:14Z")

</div>

I m using react-sdk I just want to know when my user will be logged out automatically

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [April 4, 2022, 4:33pm UTC](https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064/3 "2022-04-04T16:33:12Z")

</div>

Hi @pandeysumit832 ,

Thank you for posting this topic in the Auth0 Community!

On the Auth0 dashboard → Settings → Advanced Tab → Login Session Management, there are two parameters: “inactivity timeout” and “require login after”.

Inactivity timeout: Users will be asked to log in again unless they are active within this period (max. 100 days).

Require login after: Regardless of activity, users will be forced to log in after the period (max. 365 days).

Depending on your use case, you can find and configure the logout time there. Hope this helps!

---

<div class="post-metadata">

**Author:** ![pandeysumit832](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pandeysumit832/32/24787_2.png) [@pandeysumit832](https://community.auth0.com/u/pandeysumit832)\
**Post date:** [April 4, 2022, 5:30pm UTC](https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064/4 "2022-04-04T17:30:59Z")

</div>

Thanks for your reply it really helps. Just wanted to know one more thing I am using cacheLocation=localstorage so every time I try to fetch user it return the cached data so when there is a change in user info it return the same old data can I bypass that cache somehow?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [April 4, 2022, 6:10pm UTC](https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064/5 "2022-04-04T18:10:24Z")

</div>

Could you please explain how do you fetch users? If the user’s profile data were updated, we should be able to fetch the details from the the Auth0 Management API Get a User endpoint [  
GET](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id)[/api/v2/users/{id}](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id) [Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id)

---

<div class="post-metadata">

**Author:** ![pandeysumit832](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pandeysumit832/32/24787_2.png) [@pandeysumit832](https://community.auth0.com/u/pandeysumit832)\
**Post date:** [April 5, 2022, 5:32am UTC](https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064/6 "2022-04-05T05:32:09Z")

</div>

since I m using react sdk why would I fetch it using management api I’m using user from useAuht0 hook

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [April 5, 2022, 3:58pm UTC](https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064/8 "2022-04-05T15:58:43Z")

</div>

[This](https://auth0.com/docs/quickstart/spa/react/02-calling-an-api) article explains the details about how React calls API. We can get the access token using the [`getAccessTokenSilently()`](https://auth0.github.io/auth0-react/interfaces/auth0_context.auth0contextinterface.html#getaccesstokensilently) method from the [`useAuth0()`](https://auth0.github.io/auth0-react/modules/use_auth0.html) custom React Hook to return user profile details.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 22, 2022, 11:32am UTC](https://community.auth0.com/t/for-how-log-user-is-logged-in-to-the-application/81064/9 "2022-12-22T11:32:47Z")

</div>


