Overview
API for Auth server with HTTP endpoints and Socket.IO WebSocket protocol.
This server facilitates communication between the Decentraland clients and the auth dapp on the browser. It allows the desktop client to execute wallet methods (eth_sendTransaction, personal_sign, etc.) using the wallet the user has on their browser.
Request Lifecycle
A request is created with a method and parameters
The server returns a request ID, expiration time, and verification code
The auth dapp recovers the request using the request ID
The request is executed on the auth dapp with the user's wallet
The outcome (result or error) is submitted back to the server
The original client receives the outcome via WebSocket or polling
Request Characteristics
Only one request can exist at a time per connected socket. A new request will invalidate a previous one if it existed.
Requests have an expiration (default: 5 minutes), and cannot be consumed after it.
If the socket disconnects, any request made by that socket will be deleted.
Authentication
For methods other than
dcl_personal_sign, anauthChainis required and will be validated.For
dcl_personal_sign, noauthChainis required initially.Signature validation is performed using
@dcl/cryptoAuthenticator.
Last updated