I’ve developed a custom Nextcloud app, and I’m trying to implement proper session expiration handling.
In built-in apps like Files, Calendar, and Contacts, when a user’s session expires, they are either redirected to the login page or prompted to log in again. I would like to achieve the same behavior in my app — ensuring that users are redirected to the login page if their session has expired.
Could someone guide me on the recommended approach to handle this the “Nextcloud way”? Is there a built-in middleware, annotation, or controller pattern I should be using to avoid repeating login checks manually in every controller method?
Thanks in advance!