My users kept complaining that the admin panel logged them out "all the time", even with Remember me checked. I assumed it was just the PHP session expiring. Half of that was right. The other half was a quiet configuration trap in the CakePHP authentication stack. It probably affects other CakePHP 5 apps that use cakedc/users with the default authenticators.
TL;DR: the Cookie authenticator in CakeDC/Users' default config has no identifier of its own. In cakephp/authentication 3.3, an authenticator without one inherits the identifier of the previous authenticator that had one. In the default order, that's the Token authenticator, which looks users up by api_token . So the remember-me cookie is written but never matches anyone. Give Cookie its own identifier and it works.
Versions where I hit it: CakePHP 5.4, cakedc/users 16.0.4, cakedc/auth (its CookieAuthenticator ), cakephp/authentication 3.3.7.
The symptoms
You sign in with Remember me checked.
The browser does get a cookie.…