Hi,
Right now my session is expiring right after inactivityDuration: 30 * 60
(30 minutes). I want the session to automatically extend on user activity (e.g., API calls, page navigation) but still enforce an absolute max duration of 8 hours.
This is my current src/lib/auth0.ts
config:
session: {
rolling: true, // extend session when server is hit
inactivityDuration: 30 * 60, // 30 minutes idle timeout
absoluteDuration: 8 * 60 * 60, // 8 hours hard cap
},
-
Is this the correct way to keep sessions alive based on user activity?
-
Do I need to configure anything else (middleware, API routes) to make sure “activity” extends the session correctly?
-
What’s the best practice to handle this in a large-scale production app?