I have a particular authentication flow that must occur for Backend Users on my OctoberCMS web app. The process involves 2-factor authentication.
Initially, I thought of a direct hack into 'backend.auth.extendSigninView' event to alter the login form directly using Javascript and then setting the form action to the desired route.
EXAMPLE:
Event::listen('backend.auth.extendSigninView', function($controller) {
$controller->addJs('/plugins/x/y/assets/z.js')
});
That idea seemed "SUPER HACKEY" to me so I spent way too much time trying to find the "right way" to hook into the sign-in without success.
I have now come across another coder who posted https://github.com/khoatran/october-ldap their idea using the above-mentioned hack of using 'backend.auth.extendSigninView' to allow JS to redraw the form.
Does anyone know a better way or is this the best approach?