You can have a digital ID that you store in a wallet. You can then present the credential and selectively disclose information.
There's a bunch of W3C specs and RFCs around this.