Install
Works with Drupal: ^11.1 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
29.42 KB
MD5: cb4a1587d68b762bbd492c888476316c
SHA-1: 58c42edb132e7332cebcc29873b03d306d1a2cfb
SHA-256: e9e543e4a925e8e253d150ae481a2cd78e2a3384936fba2eb5ca418b6cea5214
Download zip
38.02 KB
MD5: e10e561f28c33bb78dbd160dfb6f0d96
SHA-1: 6a23c7d9a9d7e8ead9fca149fe8c461bceeabe33
SHA-256: e2745fb83899641aed830257b2a6f1d3f43489772a8696822d89710f030f4f52
Release notes
First beta of Wallet Auth: sign in to Drupal with a wallet instead of an email and a password. The wallet is the identity, for people and for AI agents alike.
What it does
- Sign-In With Ethereum (EIP-4361): the site hands out a one-time nonce, the wallet signs the message, and Drupal recovers the address and opens the account that holds it, or creates one.
- People and agents alike: people sign in the browser with MetaMask or any EIP-1193 wallet; agents sign the same message in code with their key (
scripts/sign-in.mjs, with viem). - Several wallets per account: link more from the account's edit form or
POST /wallet/link. A wallet belongs to one account only. One EVM address covers every EVM chain (Arc, Base, Polygon…). - Respects the site's registration setting: administrators only creates no accounts, approval creates them blocked.
Endpoints
GET /wallet/nonce:{nonce, domain, uri}. The nonce works once, for 5 minutes.POST /wallet/login:{message, signature}. Returns{uid, name, address}and the session cookie.POST /wallet/link: same body plusX-CSRF-Token. Adds a wallet to the signed-in account.
Refused with 403 and the reason: another site's domain, a used or unknown nonce, an expired message, or a signature from another address.
Security
- Signature recovery in PHP (secp256k1 + Keccak), checked against test vectors generated with viem.
- Nonces are single use and short lived; the message's domain and URI must b
- No new dependency beyond
kornrunner/keccakandkornrunner/secp256k1; needs PHP 8.3 withext-gmp.
Known limits
- EVM wallets with plain (EOA) signatures only: smart-contract wallets (ERC-
- Beta: the API and routes may still change before 1.0.0.
Related
Built for Ombú, an agxt to x402 Pay (HTTP 402micropayments in USDC on Arc): an account's wallets let purchases and prices attach to it.
Requires Drupal ^11.1 || ^12.