Hi all I believe there is a bug when using BasicAuth with Dash 2.6 (it is working fine with 2.5.1).
The error I receive is the following, I have a hunch it’s got something to do with the fix to allow redirection from “/” in 2.6, @AnnMarieW ?
Traceback (most recent call last):
File "/home/renaud/repos/enea/vetef-ui/vetef_ui/application.py", line 36, in <module>
auth = dash_auth.BasicAuth(app, USER_AUTHENTICATION)
File "/home/renaud/miniconda3/envs/dash/lib/python3.9/site-packages/dash_auth/basic_auth.py", line 8, in __init__
File "/home/renaud/miniconda3/envs/dash/lib/python3.9/site-packages/dash_auth/auth.py", line 12, in __init__
File "/home/renaud/miniconda3/envs/dash/lib/python3.9/site-packages/dash_auth/auth.py", line 18, in _overwrite_index
original_index = self.app.server.view_functions[self._index_view_name]
Are you using
pages? The update I did should only affect when
Thanks for reporting @RenaudLN
@AnnMarieW, would you like me to open an issue or would you like some time to take a deeper look at this?
I’m having a similar, if not the same, issue with a custom rolled version of BasicAuth. When I switch the
use_pages flag to
False the app can then load the
/ route fine.
Hi @gabrielcenteno and welcome to the Dash community
This bug is new in 2.6.0. Still working on the fix, but if you would like to use
pages, then another option is to use dash==2.5.1
Hi @AnnMarieW -
I believe that I’m experiencing the same error now. Do you happen to know if it was supposed to have been fixed?
Yes, try upgrading to the latest version of dash.
There are some other issues related to BasicAuth, but the one reported in this thread has been fixed
Ah, thanks. My apologies - I just went with this example without realizing that it was on an older version of Dash. After upgrading things are working. Thanks for your help @AnnMarieW.