How to add Two-factor Authentication to External login providers?

I'm trying to get Two-factor Authentication when I log in with Entra ID. As I understand it, it's not included by default, but the dialog for it only comes up when logging in with a local user.

So is there any way to trigger the behavior in the OnExternalLogin method for example?

Umbraco’s Two-factor authentication and external login providers do not really fit that well together. When you add an external login provider, you hand over the task of authenticating the user to that service.

For instance, we use Google for Business, and if we were to add that provider to an Umbraco instance, then that provider would already require you to use Two-factor authentication. So when I log in through Google, Google would then ask me to provide a 2fa code. Therefore, I cannot set up Umbraco to also require two-factor authentication, as the concept of having an external provider is that they tell Umbraco when a user is recognized.

That being said, if you want to be adventurous, you can trigger a lot of things in the OnExternalLogin method, including your own mechanisms. You will, however, not be able to trigger Umbraco’s two-factor authentication as far as I know.

1 Like

Thanks. I start looking om Entra ID side. :slight_smile: