Enforce second factor disables use of anonymous posting

We have enforce_second_factor set to ‘all’. We have also enabled anonymous posting. However, since enabling enforce_second_factor, it is not possible to switch to anonymous mode. Immediately after switching, you are redirected to the anonymous user profile and are told that it is required for you to enable second factor authentication. You cannot do anything as an anonymous user anymore.

For us it’s a requirement to have both of these settings enabled, and I would like to make a fix for it, but I’m curious what would be the prefered outcome for Discourse?

I am thinking in the direction of detecting somehow if a user is an automatically created anonymous user, and then not forcing the second factor requirement.

Any thoughts?

6 Likes

This is likely a bug @sam

4 Likes

I’ve created a fix here:

6 Likes

Hey @rrooding that looks great to me, I just merged it. Thanks for the report and the patch!

4 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.