Skip to main content

Overview

Decentralized ID (DID) tokens are used as cryptographically-generated proofs that are used to manage user access to your application’s resource server. By adapting W3C’s Decentralized Identifiers (DID) protocol, the DID token created by the Magic client-side SDK (see getIdToken) leverages the Ethereum blockchain and elliptic curve cryptography to generate verifiable proofs of identity and authorization. These proofs are encoded in a lightweight, digital signature that can be shared between client and server to manage permissions, protect routes and resources, or authenticate users. The DID token is encoded as a Base64 JSON string tuple representing **[proof, claim]**:
  • proof: A digital signature that proves the validity of the given claim.
  • claim: Unsigned data the user asserts. This should equal the proof after Elliptic Curve recovery.
JavaScript

Use Cases

  • Users have control over their own identity without relying on a central authority
  • DIDs can be used for secure authentication and authorization processes

Usage

Generating a DID Token (Pseudo-code)

JavaScript

Token Specification

Resources