How to log user time logged in?

My goal is to be able to generate a list of users showing how much time they were logged into my Nextjs web app with an active session (not logged out - browser not closed).

Does Auth0 have something built in for this?

Should I be trying to see if the session is still open with the getTokenSilently() method?

Hi @evan3,

Welcome to the Auth0 Community!

Unfortunately, there isn’t a feature built-in to calculate the user’s logged-in time.

If you have a moment, I would highly encourage you to submit and vote for this feature request through our Feedback category . In doing so, these features can be backlogged, prioritized, and then implemented according to the number of votes.

It may be possible to calculate the user’s logged-in time using the getTokenSilently() method. But regardless of any approach, it will require some hacking. There is also the option of checking your logs to determine the length of the user’s session.

Please let me know if you have any questions.

Thank you.

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