Hi. Was about to start a new thread but found this one, so i'll bring this to life again instead.
I have the same challenge for a site im building. Two factor will be mandatory. Im building a site for a customer and their employees and they want it that way.
For the moment i have built a Middleware after the Auth Middleware to check if the "two_factor_confirmed_at" is null. If so I will send them to the "Two factor onboarding" until they proceed and confirm.
In the onboarding they will have to click "proceed" which makes them send the post request to "/user/two-factor-authentication" to enable the two factor. The click will also generate a new two_factor_secret, to prevent lockout if they cancelled the onboarding earlier.
This requires 'confirm' => true, in the Fortify config since Fortify will send them straight to the two factor auth if they logout and login without confirming the two factor auth. In that case you cant access the user object until after the two factor auth which they did not finalize, resulting in a lockout.
This works, and I will probably keep it this way. But it feels a little like a workaround. Ideally there would be an easier way to force this with every registration instead of putting middlewares after Fortify.
Does anyone have a prettier solution?