I like to start by planning. The following questions usually lead me to a nice place:

- Where do I wanna go with this knowledge? (E.g. 1: I want to learn Django to build a management portal for dealing with data sizes. E.g. 2: all I want is to get to know it better so I can decide whether it is the best Framework for my needs)

- Considering the last question, where can I search for what I need? (E.g. 1: If I'm a visual learner I can search on YouTube for a quickstart tutorial, or for a step-by-step on a similar development. If I learn by practicing, I can follow the official documentation tutorial or find a similar approach on GitHub. E.g. 2: I can read a review, scan the documentation, watch videos, or listen to podcasts, depending on which is better for me to fit into my routine and absorb the concepts)

- Last but not least, how can I fit the study into my routine? Do I prefer to spend a few hours on the weekend, or a few minutes every day? If I have a long time to dedicate, I might be interested in reading more and watching large approach tutorials before I get my hands dirty. Else, if I only have a few minutes, It doesn't make sense for me to watch a whole video without putting it into practice, because the next day I won't remember important details about the implementation. Instead, I ought to choose a step-by-step quickstart tutorial, so I can advance a few steps every day. Once I finish it, I can divide my final objective into tiny tasks, which I can solve individually.

Oh I see... I'm still studying the case, but here is an idea:

Instead of having the client access directly the /login, you can put a layer between them. The client access your layer, that forwards the request to the /login, receives the response but only sends it after the 2FA. Does it work for you?

Also, idk if you have checked it out already, but this link might help: 
https://docs.intersystems.com/iris20232/csp/docbook/DocBook.UI.Page.cls?...