Authentication
The Authentication process with Index Network is vital for enabling secure and decentralized identity management. By creating and signing a SIWE (Sign in With Ethereum)
message for a DID session, users engage in a secure authentication method that aligns with the principles of decentralization and data ownership inherent to Index Network.
This process ensures that users can interact with the network's features, such as creating and managing indexes, in a way that maintains their privacy and autonomy.
Authenticating using SDK
To start, instantiate the IndexClient
by providing the necessary configuration parameters:
Alternatively, the client can be initialized with a session string, which you can obtain by signing in with a wallet yourself.
Under the hood, the method streamlines secure authentication by using an Ethereum wallet provided for signing and blockchain interactions, generating a unique DID key for decentralized identity, and constructing and signing a SIWE message to request data access. It then creates a DID session using this message and DID key, containing an authentication token for future requests.
Finally, it stores this token within the IndexClient
, automatically including it in API request headers for user authentication.
Sending the Signature in Requests
Last updated