To solve the problems of strong coupling between users and clients and the vulnerability of privacy security due to the plaintext storage of Verifiable Credentials (VCs) in the off-chain clients in the existing Decentralized IDentity (DID) authentication schemes, an on-demand disclosure blockchain digital identity authentication mechanism was proposed, namely DCIdentity. Firstly, based on the World Wide Web Consortium Decentralized IDentifier (W3C DID), user identities’ VCs were encrypted and stored on the blockchain, which reduced users’ dependency on clients and realized loose coupling between the authentication process and the clients. Secondly, a hierarchical encryption mechanism for VCs was designed to support on-demand disclosure of user information, which enhanced efficiency in multi-party authentication and reduced the associated overhead. Experimental results show that compared with the off-chain storage scheme, the proposed mechanism reduces the degree of coupling between the clients and the user authentication process effectively, and achieves the on-demand disclosure of user identity information; compared with the Ciphertext-Policy Attribute-Based Encryption (CP-ABE) scheme, the proposed mechanism has the encryption processing delay and the on-chain storage overhead decreased by 91.5% and 84.1%, respectively. It can be seen that the proposed mechanism provides an efficient solution for unified identity authentication in multi-domain multi-application scenarios, which improves the authentication efficiency significantly while ensuring the privacy of user information, and can support the landing application of DID in actual scenarios strongly.