[Writing an answer because I do not have sufficient authority to comment on the answer of Sean Vieira]
I looked at the Flask-Security code for a bit - using the Flask-Login LoginManager for this. Flask-Login, in turn, expects the user to define token_loader (and also implements get_auth_token in the User class)
Does Flask-Security provide token_loader functionality by default? Otherwise, this is the same as Flask-Login.
Edit: Turns out Flask-Security is working fine. I do not need to write my own loader token. I had a security code in a separate file, and this is how the magic broke. I returned the security code to myapp / init .py - and the documented code "works"
Edit 2: See the answer provided by Sean above. I do not think this is one or the other. You need to use the auth_token_required decorator. Overriding get_auth_token in the User class is optional if you need another implementation to generate a token (I think) It is not enough to override get_auth_token in the User class.
source share