How can I redirect after expiring a session in cakephp 3.8?

hello greetings community.
I have the following problem using cakephp 3.8.
When closing a session because its time has expired, it closes and remains on the same page.
What I try to do is that when I log out due to inactivity, I go to users/login.
Could you help me?
either providing the necessary documentation to read or placing an example of how to do it.
I thank you in advance

I think session is controlled at server site so if you want generating new request from browser after some time / conditions you should implement some timer in js which eventually make this request. Like in bank apps where you have visible countdown.

Hi @jarekgol
yes, I already imagined it, when reviewing the documentation I did not get anything and several forums do not give a specific answer and recommend that action.
Thank you very much for the answer, it confirms my suspicion