**Motivations:** - Consigner l'état actuel du dépôt (cron, service-login-verify, website-skeleton, userwallet, docs). - Centraliser les modifications en attente. **Root causes:** - N/A (commit groupé). **Correctifs:** - N/A. **Evolutions:** - Cron quotidien restart services : script local sans SSH, systemd (bitcoin-signet, bitcoin, APIs, dashboard, userwallet, website-skeleton) + Docker (mempool, bitcoin-signet-instance). - Feature cron-restart-services-local : documentation et règle scripts locaux / pas d'SSH. - service-login-verify : module vérification login (buildAllowedPubkeys, verifyLoginProof, nonceCache). - website-skeleton : app iframe UserWallet, config, systemd unit. - userwallet : collectSignatures, relay. - docs : DOMAINS_AND_PORTS, README, WEBSITE_SKELETON ; features userwallet-contrat-login, timeouts-backoff, service-login-verify. **Pages affectées:** - data/restart-services-cron.sh, data/restart-services.log, data/sync-utxos.log - features/cron-restart-services-local.md, features/service-login-verify.md, features/userwallet-contrat-login-reste-a-faire.md, features/userwallet-timeouts-backoff.md - docs/DOMAINS_AND_PORTS.md, docs/README.md, docs/WEBSITE_SKELETON.md - configure-nginx-proxy.sh - service-login-verify/ (src, dist, node_modules) - userwallet/src/utils/collectSignatures.ts, userwallet/src/utils/relay.ts - website-skeleton/
31 lines
1.0 KiB
Markdown
31 lines
1.0 KiB
Markdown
# service-login-verify
|
||
|
||
Verify login proof and anti-replay policy for services that embed UserWallet in an iframe.
|
||
|
||
## Purpose
|
||
|
||
The **service** is the parent application that embeds UserWallet. It receives `login-proof` via `postMessage` and must verify the proof before accepting a session, **without a central server**. This package provides:
|
||
|
||
- `verifyLoginProof(proof, context)` – full verification (crypto, allowed pubkeys, timestamp window, nonce anti-replay)
|
||
- `NonceCache` – in-memory anti-replay cache (TTL configurable)
|
||
- `buildAllowedPubkeysFromValidateurs(validateurs)` – build allowed pubkeys from action login validators (`cle_publique` only)
|
||
|
||
## Usage
|
||
|
||
See `features/service-login-verify.md` for explanation and usage example.
|
||
|
||
## Install
|
||
|
||
From the repo root:
|
||
|
||
```bash
|
||
cd service-login-verify && npm install && npm run build
|
||
```
|
||
|
||
Consuming apps can add a workspace dependency or link to `../service-login-verify`.
|
||
|
||
## References
|
||
|
||
- `features/service-login-verify.md`
|
||
- `features/userwallet-contrat-login-reste-a-faire.md` (§ 3.7)
|