Is there a way to store users first login time in react js application with react-oidc-context

I am using OIDC for authentication in my react application. For that i am using react-oidc-context library. There was some use case in our application that user first time login time i want to store in my application so i can compare his login time with current time and will logout user once 8hrs completed. I know token expiry also do the job but token we are renewing every 30minutes just i want to check if the user has been logged in for more than 8 hours he should get logged out.

I am trying to store login time in localstorage when user is authenticated by auth.isAuthenticated but the problem is if i refresh the tab then the new login time is get added to the locasotrage.