app.models.user.User.verify_and_update_password
- User.verify_and_update_password(password: str) bool
Returns
True
if the password is valid for the specified user.Additionally, the hashed password in the database is updated if the hashing algorithm happens to have changed.
N.B. you MUST call DB commit if you are using a session-based datastore (such as SqlAlchemy) since the user instance might have been altered (i.e.
app.security.datastore.commit()
). This is usually handled in the view.- Parameters
password – A plaintext password to verify
New in version 3.2.0.