MFA as a Service - Sample Implementation


Looking at implementing MFA as a Service to perform ad-hoc or step-up authentication using the Okta widget infrastructure (for a user already logged in to Okta). I’ve read a number of different ways to do this (from using the api exclusively to stuffing the stateToken and calling the widget directly) and need to know if the advice here is the most current and accurate:

Has anyone developed any sample code for this scenario? It would be /most/ helpful.