I am currently working on implementing Duo Two-Factor Authentication into my django project. Currently it looks like django-duo-auth is the best package for this. I installed the package and went through the basic instructions on their README:


However this has caused my project to continuously redirect to a nonexistent subdirectory of ‘duo’ which is what I named the path. For example my app is loaded in XX.XX.XX.XX:YYYY Going to that url auto redirects the page to:

Or, XX.XX.XX.XX:YYYY/admin auto redirects to:

This simply will lead to django’s generic base.html that duo_auth_form.html extends

Here are some snippets of relevant code, though it doesn’t differ to much from the package’s README suggestions


urlpatterns = [
    path('admin/', admin.site.urls),
    path('duo/',  include('duo_auth.urls')),




    'DEFAULT': {
        'HOST': '<api-host-url>',
        'IKEY': '<integration_key>',
        'AKEY': '<app_secret_key>',
        'SKEY': '<secret_key>',

The only difference anywhere from the read me is a slight redirection in the sample do_auth_form.html
where I extend to a subdirectory of my templates i.e. {% extends "dirbase.html" %} at the top of the file.

It appears like this package is fairly new and there isn’t a lot of forums for issues so I figured it would be best to ask here. Any help would be appreciated!