Apr-16-2018, 03:14 PM
Alright, after looking through the source, it looks like the LoginManager doesn't actually manage the session itself, it only adds some things on top of it. So you still need to let Flask know what sort of session management you're using.
After you create your app, but before running it, try adding this line, and let's see if that fixes it (or at least gives a different error):
https://github.com/pallets/flask/blob/ma...ns.py#L124 Wrote:If :meth:That's the error you're getting, which leads me to believe this is an easy fix.open_session
returnsNone
Flask will call into
:meth:make_null_session
to create a session that acts as replacement
if the session support cannot work because some requirement is not
fulfilled. The default :class:NullSession
class that is created
will complain that the secret key was not set.
To replace the session interface on an application all you have to do
is to assign :attr:flask.Flask.session_interface
::
app = Flask(__name__)
app.session_interface = MySessionInterface()
After you create your app, but before running it, try adding this line, and let's see if that fixes it (or at least gives a different error):
app.session_interface = session.SecureCookieSessionInterface()