Zero-knowledge proofs exist, that verify that a user's id holds certain properties, without leaking said ID.