if isinstance(current_user, User):
    identity.provides.add(UserNeed(current_user.id))
for permission in user.permissions:
    pass
Flask Login and Principal - current_user is Anonymous even though I'm logged in