Overview
The Identity module provides a comprehensive system for managing user identities across multiple origins (authentication providers). It supports both individual users (KYC) and business entities (KYB), with features for alias management and multi-origin registration.Key Concepts
Identity URN
Every identity in the Bloque platform is uniquely identified by a URN (Uniform Resource Name) in the format:Origins
Origins represent authentication providers or entry points for identities. Common origin types include:- EVM Blockchains - Ethereum, Polygon, Base, etc. (using wallet signatures)
- OAuth Providers - Auth0 and other OAuth2 providers
- OTP Providers - WhatsApp, Email
- API Keys - Traditional API key authentication
Aliases
Aliases are human-readable identifiers associated with an identity. Examples:- Email addresses:
[email protected] - Phone numbers:
+1234567890 - Blockchain addresses:
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
Identity Client
TheIdentityClient provides access to identity management functionality:
Get Current Identity
Retrieve the authenticated user’s identity profile:Identity Profile Types
Individual Profile
identity/src/types.ts
Identity Response
identity/src/types.ts
Sub-Modules
The Identity module includes specialized sub-clients:Aliases
Manage identity aliases and lookups
Origins
Register identities and manage origins
Example: Complete Identity Flow
Status Values
Identities can have the following statuses:active- Identity is active and can perform operationsinactive- Identity is temporarily inactiveawaiting_compliance_verification- Pending KYC/KYB verificationsuspended- Identity has been suspended
Best Practices
Use Appropriate Origins
Use Appropriate Origins
Choose the origin type that matches your use case:
- Blockchain apps: Use EVM or other chain-specific origins
- Web apps: Use OAuth or email/WhatsApp OTP
- Backend services: Use API key authentication
Handle Multiple Aliases
Handle Multiple Aliases
Users may have multiple aliases across different origins. Use the URN as the canonical identifier.
Verify Identity Status
Verify Identity Status
Always check the identity status before performing sensitive operations.
Related Resources
Compliance
KYC/KYB verification for identities
Organizations
Manage business organizations