jazzband / django-two-factor-auth

Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.
MIT License
1.67k stars 446 forks source link

Why depend on django-phonenumber-field? #245

Open danielquinn opened 6 years ago

danielquinn commented 6 years ago

Expected Behavior

If this project can run without using phone number stuff for 2fa, then having it as a base dependency seems excessive, especially when you've already got Call defined in extras_requries=.

Current Behavior

Installing django-two-factor-auth pulls in django-phonenumber-field, which in turn brings in phonenumberslite, but if you're not using any of the SMS features, these are all loaded for no reason (as far as I can tell)

Possible Solution

Move django-phonenumber-field into extras_require= inside Call and SMS.

Context

I'm running into problems with phonenumberslite in the area of dependencies & updates etc. I know I'm not doing anything with phones, so I started digging to find out why this is being pulled in at all.

Your Environment

Bouke commented 6 years ago

Historically phone/text support was not optional for this package. Over time phone/text support has increasingly been decoupled, however there are still some places where a hard dependency exists. As mention elsewhere in the issues section, it would be nice if this package would adopt a modular design, where multiple OTP systems could be hooked in.

peymanslh commented 1 year ago

I think this will be fixed when #469 closes.