Two-Factor Authentication

With two-factor authentication, it adds an extra layer of protection to your user accounts. The two-factor authentication in Tendenci is based on Django Two-Factor Authentication .

To enable the two-factor authentication, set USE_TWO_FACTOR_AUTH = True in your conf/

There are 3 options available - 1) Token based (which can be used with Google authenticator or other authenticator OTP). 2) Email. 3) SMS. The first two options are enabled by default.

If you want to have the SMS capability, you’ll need to sign up Twilio’s SMS service.

Once you have your Twilio’s credentials, follow these two steps below.

  1. Add these settings to your `conf/

INSTALLED_APPS += ('two_factor.plugins.phonenumber', )
TWO_FACTOR_SMS_GATEWAY = 'two_factor.gateways.twilio.gateway.Twilio'
  1. AT the top of your conf/, add from two_factor.gateways.twilio.urls import urlpatterns as tf_twilio_urls, and include path(‘’, include(tf_twilio_urls)), to the urlpatterns.

Once the two-factor authentication is enabled on your site, users will be able to set it up from their accounts.