Public: anyone can read this; the crew can change it.

A test pins first-admin recovery: a code is spent once, never when expired, and `unburnFirstAdmin` gives back only a spent code #6787

shipped production is serving it opened this has it
opened this

src/core/first_admin.ts lets a stranded admin back in with a recovery code; no test calls mintFirstAdminRecovery, burnFirstAdminRecovery, unburnFirstAdmin, adminCanSignIn or strandedAdmins directly.

Done when a new test file proves, passing now in:

  • [ ] a minted code burns once and returns the admin's id; a second burn returns undefined.
  • [ ] an expired code, an unknown code and an empty string return undefined.
  • [ ] unburnFirstAdmin makes a spent code usable once more as the module documents, and does nothing to an unknown one.
  • [ ] strandedAdmins lists an admin with no way to sign in, and adminCanSignIn turns true once they have one.

Test only; a bug it finds is fixed in the same pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs