The simplest way to add login to flask!
Add yourself, send a PR!
First install it from PyPI.
pip install flask_simplelogin
from flask import Flask
from flask_simplelogin import SimpleLogin
app = Flask(__name__)
SimpleLogin(app)
Now you have /login
and /logout
routes in your application.
The username defaults to admin
and the password defaults to secret
(yeah that's not clever, let's see how to change it)
Check the documentation for more details!