Cakephp 4 RequestAuthorizationMiddleware

Im having the same problem. If identity is empty and I return false I get an authorization error, if i return true it will redirect to login page.