title: How to combine Dash and Flask login without using iframe?
body: <p>I have a flask application, some pages of the app is protected with Flask-Login, I need to add Dash plot to my application, the plot should be on the page which requires authentification. I should add that in addition to Flask Login, I created user access levels using flask session.</p>
  
  <p>I found how to combine Dash with protected page using iframe block, but I would like to try to make dash plot as a separate page (not iframe) with user authentification. If forget about authentification I have no problen to add Dash plot as a separate page in Flask app.</p>
  
  <p>Typically I do the following to check login:</p>
  
  <pre><code>@app.route("/somempage", methods=["GET", "POST"])
  @flask_login.login_required
  def return_somepage():
      active_username = session['user_id']
      try:
          HOST, USER, PASSWORD, AUTH_PLUGIN = 
          InitSetup.read_mysql_init_config_file(WORKDIR +
          os.path.join(os.getcwd(), "mosreg_webscrap_website.config.txt"))
          conn, curs = MySQLOP.create_mysql_connection(HOST, USER, PASSWORD, 
          AUTH_PLUGIN)
          active_user = MySQLOP.retrieve_userinfo_from_db(curs, 
          active_username)
  #now we check value of db colum and decide if user can see the page:
  if active_user[0][4]:
      #show page
  else:
      # return user have no rights to see the page template
  </code></pre>