Flask-login token loader
On the Flask mailing list, Matt Wright pointed me to his implementation in the flask-security extension. He uses itsdangerous to create a signed token which encodes a serialized (via URLSafeTimedSerializer()
) list consisting of the user ID and the password hash. The token can then be decoded to grab the user ID.