replace hashlib.sha1 with default_token_generator in InvitationManager