the best way of using multiple login authentication is that you must code into application.php file. If you are using authentication plugin then you have more control about login system for web application and Api based application. Authentication plugin provide some methods and these method s match request URL and return response according to your Request URL… Web or Api, this is the best way for multiple login authentication even you can provide role base access there.
If you mean something like 2FA I can recommend you look at CakeDC/Auth
It uses a custom AuthenticationService class to overwrite the authenticate() method which is called by the AuthenticationMiddleware
But from what I can understand is that you probably mean a custom Authenticator and/or Identifier.
I would recommend you watch my Cakfest Workshop from last year going through the concept of these 2 components.
Because in the end all requests get processed by the AuthenticationMiddleware and therefore through the whole Authenticator => Identifier procedure.