Deny Direct Access to route unless Logged in Flask and Dash

0

I have a Flask application which I have added a dash app on top of,

My Flask application handles my user sessions and my login/logouts etc.

My Dash app handles my visualizations and sits on its own URL route,

I make use of DispatcherMiddleware to be able to load my dash app and be able to run the Flask app and Dash app simultaneously.

I need to stop direct access to my Dash App if a user hasn’t signed in, I have come across this article but it doesn’t tell me where in the actual file structure this must go to be effective

Merge Flask and Dash

Any advice would be much appreciated.