Make AuthComponent explicitly use User model, which should hopefully get rid of the "on null" type errors we are seeing in production. Also adjusts cookie deletion in AuthComponent to be a bit more aggressive, deleting top level User key and not just User.auth and always deleting cookie on redirect to login page (if triggered via the startup method).
Was unable to exactly reproduce prod issues locally, but hopefully this should work 🤞
Make AuthComponent explicitly use User model, which should hopefully get rid of the "on null" type errors we are seeing in production. Also adjusts cookie deletion in AuthComponent to be a bit more aggressive, deleting top level
User
key and not justUser.auth
and always deleting cookie on redirect to login page (if triggered via thestartup
method).Was unable to exactly reproduce prod issues locally, but hopefully this should work 🤞