Question reg. user context in ComposeClient

I have a question regarding the use of ComposeDB at this point. The docs talk about the necessity to use ComposeClient.setDID(…) to mutate documents. Does this mean building an app with user login/context (similar to self.id) would require the app to set the DID of the current user in the ComposeClient, so it acts on behalf of the current user? How does it sign anything on behalf of the user? It seems this concept is drastically different from CurrentViewer behavior before?
Thanks for any clarification! I’m trying to understand whether I can use ComposeDB for my multi-user app prototype.

To answer my own question: Yes. This was helpful in answering it: Using With ComposeDB Client | Decentralized Identifiers (DIDs)

1 Like

Thanks for asking and also answering Jan, much appreciated. DIDs are passed similarly in ComposeDB to the previous stack, the main change is the DID method now is did:pkh not 3ID.

In addition to the guide you linked, I’d also recommend checking out Orbis’s implementation, the code is well commented and they use did:pkh and the did-session library orbis-sdk/index.js at 13cf720cc18f0fdb5c7008d40b8dad0d72cf1d8d · OrbisWeb3/orbis-sdk · GitHub

1 Like