def delete_auth_token(user_id):
    # Invalidate any prevously generated Kobo Auth token for this user.
    ub.session.query(ub.RemoteAuthToken).filter(ub.RemoteAuthToken.user_id == user_id)\
        .filter(ub.RemoteAuthToken.token_type==1).delete()

    return ub.session_commit()
The software does not restrict or incorrectly restricts access to a resource from an unauthorized actor.