For how log user is logged in to the application

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

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!

2 Likes

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?

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
/api/v2/users/{id} Auth0 Management API v2

2 Likes

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

This article explains the details about how React calls API. We can get the access token using the getAccessTokenSilently() method from the useAuth0() custom React Hook to return user profile details.

2 Likes