Dash Basic authentication not working when the app is deployed on AWS

The dash basic auth implementation works good on my local machine. But when I deploy the same app on AWS Elastic Beanstalk, the username and password request screen keeps popping up continuously even after I enter the correct credentials of username and password.

When I load the AWS url, it asks for a username and password. I now enter the username and password. But now, the same username and password request screen appears again and again in spite of me entering the correct username and password. Why is this weird behaviour?

I’m using the following package versions:


1 Like


did you ever find a resolution to this issue?


Same issue with the latest version of dash and dash-auth. Only works locally.

FIXED after many hours, at least for my config which is hosted using mod_wsgi and apache2.

In your /etc/apache2/sites-enabled/.conf file, add the following line within the virtualhost tags

WSGIPassAuthorization On

Restart apache and it should work.

Hi @hbhargava. I am running into the same trouble when trying to do it on AWS. Is this the only change you made? Cheers

@mikeypatt16 - yes, this was the only change needed. For a general guide on everything else, I think I basically did this: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps. Good luck!

@hbhargava thank you very much for this. Did you move it onto AWS afterwards or is that not necessary?

Yeah - In this case my “Ubuntu VPS” was an AWS EC2 instance running Ubuntu.

1 Like

Hi @hbhargava, I am really struggling with this. Would you mind sharing your code to github? I would very much appreciate this!