auth/bootstrap_routes.ts view source
BootstrapRouteOptions import type {BootstrapRouteOptions} from '@fuzdev/fuz_app/auth/bootstrap_routes.js'; Per-factory configuration for bootstrap route specs.
bootstrap_status is runtime state (a mutable ref), not a dep or options value —
it is passed through so the route handler can flip it on success.
session_options
type SessionOptions<string>
bootstrap_status
Shared mutable reference — flipped to false after successful bootstrap.
type BootstrapStatus
on_bootstrap?
Called after successful bootstrap (account + session created). Use for app-specific post-bootstrap work like generating API tokens.
type (result: BootstrapAccountSuccess, c: Context<any, any, {}>): Promise<void>
result
c
Context<any, any, {}>Promise<void>bootstrap_ip_rate_limiter
Rate limiter for bootstrap attempts, keyed by client IP. Pass null to
disable. Its own instance, not login's: bootstrap is one-shot and its
bucket is never refunded on success (see RateLimiter.reset), so a
fumbled token would otherwise leave the operator's *login* budget nearly
spent on a deployment where their new account is the only one that
exists. The Rust spine rate-limits bootstrap not at all (the token is
32 bytes of CSPRNG compared in constant time); this is the tighter side
of that divergence, kept because the token also sits in a file whose
read path an operator can misconfigure.
type RateLimiter | null