RafaelMiquelino / dash-flask-login

Implementation of Flask-login on top of Dash.
MIT License
248 stars 81 forks source link

flask login with multi-page dash application #10

Open kevalshah90 opened 3 years ago

kevalshah90 commented 3 years ago

This seems to work when app.layout is defined in app.py. My application is a multi-page dash app and routing is different from a single page app. i.e In my case index.py contains the app.layout. My dash application doesn't load when I authenticate user and click on the link to App.

Details here: https://community.plotly.com/t/flask-integration-with-dash-app-routing/53801/3

kevalshah90 commented 3 years ago

I also posted the issue on SO: https://stackoverflow.com/questions/68231293/flask-app-requested-url-was-not-found-on-the-server-error

bsauvage1 commented 2 years ago

I have tried this with dash multipage as well, using the new functionality dash_labs.plugins.page_container, but I encounter an error when adapting the code: Cannot read properties of undefined (reading 'title') What I tried is modify the authentification if loop as follows: if current_user.is_authenticated: return dash_labs.plugins.page_container