| 1 |
from django.urls import URLPattern, URLResolver, include, path |
| 2 |
|
| 3 |
from allauth.mfa import app_settings |
| 4 |
|
| 5 |
|
| 6 |
urlpatterns: list[URLPattern | URLResolver] = [ |
| 7 |
path("", include("allauth.mfa.base.urls")) |
| 8 |
] |
| 9 |
|
| 10 |
if "totp" in app_settings.SUPPORTED_TYPES: |
| 11 |
urlpatterns.append(path("totp/", include("allauth.mfa.totp.urls"))) |
| 12 |
|
| 13 |
if "recovery_codes" in app_settings.SUPPORTED_TYPES: |
| 14 |
urlpatterns.append( |
| 15 |
path("recovery-codes/", include("allauth.mfa.recovery_codes.urls")) |
| 16 |
) |
| 17 |
|
| 18 |
if "webauthn" in app_settings.SUPPORTED_TYPES: |
| 19 |
urlpatterns.append(path("webauthn/", include("allauth.mfa.webauthn.urls"))) |