Enforce two-factor authentication on all controllers / actions

95 views Asked by At

I've built an authenticated .net core (5.0) web application using Identity (2.2) and set up two factor authentication using a smartphone authenticator app. This is all working fine. I'm now trying to configure the application to enforce the two-factor authentication so that in order to reach any controller / action (apart from those needed for the authentication process), a user MUST be two-factor authenticated, by which I mean they must have enabled 2FA, set up the smartphone authenticator app and then gone through the two-factor authentication process. I'm sure there must be an easy way to do this, but I'm unable to find any posts anywhere on how to do it. Can anyone help? Thanks in advance.

0

There are 0 answers