Can we build a Two-Factor Authentication (2FA) flow within Ignition?

Dear Team,

I am looking for guidance on implementing a Two-Factor Authentication (2FA) flow within Ignition(Internal).

Currently, we have developed a custom login screen that sends an OTP via email and then redirects to the Gateway login page. While the initial login is working, we are having trouble redirecting the user to an OTP verification page immediately after a successful Gateway login before they reach their intended destination.

I attempted to use the onAuthChallengeCompleted hook to trigger the redirect to the OTP page, but it did not work as expected. Could you please suggest the best approach or conditions required to achieve this workflow?

I'd probably suggest using a 3rd part self hosted IdP for now as it will be handled more securely and possibly even support passkeys if you want that functionality.

Look into Authentik, KeyCloak, Zitadel, and PocketID among other options.