Access user identity, device credentials, and end-to-end encryption for secure peer-to-peer communication.
webAI provides two APIs for identity and security: UserIdentityManager for accessing the current user’s identity, and E2ECrypto for encrypting and decrypting data between peers.These APIs are especially useful when building collaborative apps where you need to identify participants or secure data in transit.
UserIdentityManager provides access to the current user’s decentralized identity. In webAI, every device generates a unique identity called an (On-Device Identity) — there are no accounts, no usernames, and no central identity server.
Returns the current user’s device identity. If no identity exists yet, one is created automatically.Returns:Promise<{ odid: string, displayName: string }>
The E2ECrypto API provides encrypt and decrypt helpers for securing data exchanged between peers. This is the same encryption layer used internally by the collaboration system.
E2ECrypto is automatically used by the platform’s built-in collaboration features. You only need to use it directly if you’re building custom encrypted data flows on top of the collaboration layer.