Why isn't my current_user authenticated in flask-login?
问题 My goal is to make my home view ( / ) a login page. Once the user logs in, a different page is render depending on its role. When I login ( /auth ), I see that the username and password are correctly entered. It then attempts to render / , where it tells me that my user is not authenticated and renders /login . Here are the views that describe this: Views @app.route("/login") def login(): return flask.render_template('login.html') @app.route("/", methods=["GET"]) def home(): if current_user