New login callbacks are in development currently in
MDL-66173. They allow for addition form elements to be injected into various /login/ forms: signup_form, change_password_form, set_password_form, forgot_password_form, as well as additional validation for all of these forms during submission, and post actions after the forms are submitted.
These hooks currently have no interaction with the Webservices layer or the Mobile app, on the pages that the Moodle app can access that are modified by the hooks in the browser. Current crossover points are the signup_form and forgot_password_form.