aboutsummaryrefslogtreecommitdiffstats
path: root/names/migrate-check.js
Commit message (Collapse)AuthorAgeFilesLines
* names: /migrate-grant needs a fresh v3 hand-off stamp from coinos.io.Adam Soltys3 days1-0/+28
| | | | | | | "Fix the gap" (Adam, 2026-12-02). The reverted check keyed on `migrated`, which coinos.io has set on every new account since 2023, so it stopped nothing (c851718). coinos-server 796999cb now records `v3migrated`, a timestamp set only when an account's own session posts the hand-off, and shows it on /api/users/<name>. The grant follows within seconds, so it goes ahead only when that stamp is under 5 minutes old. That is the same proof as carrying the old account's session to /api/me, without sending coinos.io JWTs (no expiry, no revocation) to this host. A name handed over earlier can't be re-granted to a different key unless its owner hands it over again. Refused: stale, future-dated or missing stamp (409); no such account (404); coinos.io unreachable (502, the caller retries). migrate-check.test.js runs in `bun run test` (18 pass). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SSfVopM1ZzXKZmLYU
* Revert "names: /migrate-grant only hands over a name whose coinos.io account ↵Adam Soltys3 days1-19/+0
| | | | | | | | | has migrated." The legacy `migrated` flag is set on nearly every coinos.io account (295 of a 299-account sample), so the check stopped almost nothing and only made grants depend on a second call to coinos.io. The hole itself is closed in coinos-ui (374afce1: the name comes from the session, not the form). A real second check would have the grant carry the old account's session for the registrar to verify against coinos.io/api/me. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* names: /migrate-grant only hands over a name whose coinos.io account has ↵Adam Soltys3 days1-0/+19
migrated. "check with the coinos-server agent on desk about the migrate hole. We should fix the issue and get it reenabled" (Adam, 2026-12-02). The bearer token proves the caller is coinos.io, not that the name's own account asked for the grant. The grant now also asks coinos.io for the account and goes ahead only when it exists and is flagged migrated; the old account's session flags itself just before it calls the grant, so a legitimate migration passes. It refuses with 404 when there's no such account, 409 when it hasn't migrated, and 502 when coinos.io can't be asked (the caller retries). New migrate-check.test.js passes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar