Is your feature request related to a problem? Please describe.
the
method could be return a value even for AnonymousUser
Describe the solution you'd like
Check if user is an anonymous. If yes, return a flask_login.AnonymousIdentity instance.
if not user.is_anonymous:
return AnonymousIdentity()
I will be happy to contribute if you valid this feature.