As you've probably read, Flask-Login does not require you to use a database. However, it DOES require you to have a user with some sort of ID (even if you make the ID up like you've done with "all"). It also requires you to implement the following function, as shown in the docs:
@login_manager.user_loader
def load_user(userid):
# Return the user ID here.
The point of this method is that you need to specify how to identify a user by a username. In the case of someone retrieving user info from a database, they would implement this method to call the database here. In your case, you would make this method return the instance of the user object you used above:
@login_manager.user_loader
def load_user(userid):
return User()
Now, as it is, your User
method is not finished. To use flask-login, you need it to implement more methods, so make sure to implement all of them.