Logout Timer

I'm building a svelte app with a very short expiresIn and updateAge (15 and 5 mins respectively). I'm going to build a 'Your session is about to expire, are you still there?' screen using setInterval and comparing current time to expiresAt time from the session. I'm new to svelte and having a hard time wrapping my head around how to keep the session alive on any actions indicating the user is still there (including server side nav, loading links, javascript calls, etc.) but then not refreshing the session when getthing the info to compare current time to expiresAt. I guess I don't fully understand how getSession() or useSession() fully work on both client and server side. invoking them updates the expiresIn time correct?
Was this page helpful?