79589925

Date: 2025-04-24 06:15:17
Score: 1.5
Natty:
Report link

NextAuth's signOut only clears your browser/client session, you still have to make an API call to your IAM backend's end-session-endpoint with the correct parameters.

When a page loads, start a timer (and restart it with user activity if necessary) and when the timer runs out, make the call to the end-session-endpoint. If that call is successful, next-auth will pickup the session state as 'unauthenticated' then you can (for example) router.push to your login page.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: C.K. Flores