Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

How-to Guides


This section provides practical, task-oriented guides for implementing common authentication and authorization scenarios using the did-auth library. Each guide focuses on a specific task and includes ready-to-use code examples to get you started quickly.

Whether you're setting up your first DID login, requesting transaction signatures, or building complex multi-step workflows, these guides will show you how.


Set up with Express.js#

Learn how to integrate did-auth into your Express.js application. This guide covers initializing WalletHandlers and attaching the necessary middleware to handle the complete DID authentication lifecycle, from generating QR codes to processing user responses.

Request a Signature#

A common requirement for decentralized applications is to have a user authorize an action by signing a message or transaction. This guide walks you through using the signature claim to request a cryptographic signature from the user's wallet for anything from a simple text message to a complex, chain-specific transaction.

Handle Multiple Workflows#

Create sophisticated, multi-step user experiences by chaining several authentication requests together. This guide demonstrates how to use the nextWorkflow property in the onAuth callback to seamlessly guide a user from one task to the next, passing data between steps.

Implement Dynamic Claims#

Tailor your application's data requests based on user context. This guide explains how to use the onConnect callback, which runs after the user scans the QR code but before claims are sent. You can use it to dynamically determine which claims to request based on the user's DID or other session information.


After exploring these guides, you can dive deeper into the specific configurations and methods available in the API Reference.