mirror of
https://github.com/wassname/flask-security.git
synced 2026-07-09 00:20:10 +08:00
Add the ability to specify additional fields on the user model that can be used for logging in.
This commit is contained in:
@@ -32,6 +32,7 @@ def create_app(config, **kwargs):
|
||||
class User(db.Model, UserMixin):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
email = db.Column(db.String(255), unique=True)
|
||||
username = db.Column(db.String(255))
|
||||
password = db.Column(db.String(255))
|
||||
last_login_at = db.Column(db.DateTime())
|
||||
current_login_at = db.Column(db.DateTime())
|
||||
|
||||
Reference in New Issue
Block a user