Skip to main content

Recovery and bootstrap

Imported component documentation. Source: melodee-project/melodee-auth-ui at commit 0bf9bd04697609fc3d8b82eb933b1d1d29e84059. Version 2026.11.0-rc.0. License MIT. Status: A0–A10 implemented and verified on a disposable real API 1.0.0 stack; not published, tagged or deployed. This is the component's committed documentation, not proof of a distribution release or production qualification.

Both flows are explicit, one-time and server-owned. Neither creates a permanent bypass or open registration.

Bootstrap a fresh installation​

An empty installation has no sign-in path, so the API exposes a local operator command instead of HTTP registration:

MELODEE_DATABASE_URL='postgres://melodee@db/melodee' \
MELODEE_PUBLIC_BASE_URL='https://auth.example.test' \
./melodee-api bootstrap --name "Ada Administrator"

It creates the first administrator and prints a 256-bit challenge once. Only its SHA-256 digest is stored. Open /auth/bootstrap, enter the challenge, and choose Complete bootstrap. The Auth UI receives one ordinary HttpOnly browser session; it is not a privileged endpoint.

Immediately enroll a passkey or add and verify a contact. After that, the challenge cannot be replayed (409 bootstrap_complete). --reset re-opens a completed installation only when it still has no verified sign-in path; it never deletes accounts, sessions, contacts or passkeys. Do not put the challenge in shell history, a ticket, chat, CI logs or this repository.

Recover an account​

/auth/recovery requests a neutral one-time link for a verified contact. The response does not reveal whether the address is registered.

/auth/recovery/confirm removes the token from the URL and requires an explicit Recover my account action after a warning that every other session will be revoked. Confirming:

  • consumes the one-time link atomically;
  • revokes every existing session family for the account;
  • issues a fresh browser session in this browser;
  • records the audit event in the API.

A replay or expired link is rejected. Recovery does not replace contacts, passkeys or linked identities; it restores access so the user can add a backup method. If no usable path exists and the installation is pathless, the operator may use the documented --reset procedure; there is no HTTP bypass.

Provider outage​

Email-based sign-in/recovery requires SMTP. Passkeys work without SMTP if WebAuthn and protected storage are available. Google outages affect only Google flows; existing browser sessions and other enrolled methods remain usable. Operator rehearsal of a provider/SMTP outage is recorded as remaining external work.