Skip to content

chore: move the scaffold onto the current ecosystem and offer Fastify - #146

Open
Bccorb wants to merge 3 commits into
mainfrom
chore/ecosystem-v0-6-0
Open

chore: move the scaffold onto the current ecosystem and offer Fastify#146
Bccorb wants to merge 3 commits into
mainfrom
chore/ecosystem-v0-6-0

Conversation

@Bccorb

@Bccorb Bccorb commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Bumps the pinned ecosystem so seamless init scaffolds from the current releases, and adds Fastify as a backend option.

Pin Was Now
SEAMLESS_AUTH_API_VERSION v0.5.0 v0.7.0
SEAMLESS_AUTH_ADMIN_DASHBOARD_VERSION v0.3.0 v0.4.0
SEAMLESS_TEMPLATES_REF v0.5.0 v0.8.0
@seamless-auth/express (conformance adapter) ^0.9.0 ^0.12.0

Templates v0.8.0 carries @seamless-auth/react ^0.8.0 in both React starters, @seamless-auth/express ^0.12.0 in the Express starter, and @seamless-auth/fastify ^0.3.0 in the Fastify starter.

Registration without a passkey

Registration used to end on a screen with one control. A user who did not want a passkey, or whose device could not make one, had no way forward. The starters now offer a skip when the instance has another login method enabled, and say so plainly when it does not.

That path only works if the whole chain moves together, which is why this bumps them as a set:

  • The auth API adds an unauthenticated GET /system-config/public returning the configured loginMethods and nothing else (v0.7.0).
  • The adapters serve routes from an explicit list, so they had to add the proxy (@seamless-auth/express 0.12.0, @seamless-auth/fastify 0.3.0).
  • The React starters read it to gate the skip control (@seamless-auth/react 0.8.0).

A web template upgraded on its own would read nothing and show no skip at all. This also fixes a real mismatch: the React SDK previously fell back to a hardcoded ['passkey', 'magic_link', 'phone_otp'], so a client could advertise a method the instance had turned off.

Fastify

seamless init offers a second backend, listed as "Fastify (beta)" beside Express. It serves the same surface as the Express starter on an identical env contract, including the admin console at /console behind SERVE_ADMIN_CONSOLE.

This needed no CLI code. The backend prompt builds its options from the registry and already renders a beta status as a (beta) suffix without disabling the entry, and requires.cliMin (0.10.0) is satisfied by 0.10.2. Verified through the real code path at the new ref:

api options as the prompt renders them:
  - Express  (id=express)
  - Fastify (beta)  (id=fastify)

Two boot-time fixes land with v0.8.0: an empty PORT= in .env now falls back to 3000 rather than binding a random free port, and pino-pretty moves to a runtime dependency so an install without dev dependencies boots.

What else users get

Both React starters gain a protected /session route showing the issued claims, roles, organization context, step-up freshness, and registered passkeys, so the first authenticated screen reads as an app rather than a JSON.stringify dump. Missing configuration now stops a scaffolded project with a message naming the variable instead of surfacing later as a 500.

The auth API drops the admin bootstrap invite flow in favor of the OWNER_EMAIL grant the CLI already writes, so generated .env files no longer carry SEAMLESS_BOOTSTRAP_ENABLED, SEAMLESS_BOOTSTRAP_SECRET, or SEAMLESS_AUTH_DEBUG_SECRETS. AVAILABLE_ROLES now offers admin:read and admin:write, and Postgres TLS is configurable through DB_SSL, DB_SSL_CA, and DB_SSL_REJECT_UNAUTHORIZED.

Both API starters ship .env.example secret placeholders long enough to clear the adapter's 32 character minimum, so the documented cp .env.example .env && npm run dev path boots. A project from seamless init was already unaffected, because the CLI fills COOKIE_SIGNING_KEY itself.

Why the rest needed no CLI code

  • The API's standardized error shape consolidates onto { error }. loginFlow.ts and systemConfig.ts already read error first.
  • New env reaches generated projects on its own: the CLI fetches .env.example at the pinned tag and mutates the parsed result, so AVAILABLE_ROLES and the DB_SSL* keys flow through. v0.7.0 changed no env at all.
  • OWNER_EMAIL generation was already in place and was already supported by v0.5.0 (in src/lib/ownerAdmin.ts), just undocumented. Nothing was broken before this bump.
  • GET /system-config/public is consumed by the React SDK, not by the CLI. The CLI's own config command talks to the admin routes, which are unchanged.

Checks

npm run build clean, 691 unit tests pass, verify/harness tsc --noEmit clean.

Conformance passed on all three layers against auth API 0.7.0, @seamless-auth/express ^0.12.0, and @seamless-auth/react ^0.8.0, using clean checkouts at the pinned tags:

  ✔  API / adapter                 6.2s
  ✔  Web · react-vite (all flows)  11.5s
  ✔  Web · react-oauth (@oauth)    1.7s
  ✔ Conformance passed — 3 layer(s).

Two caveats on coverage, both worth knowing rather than blocking:

  • The harness has no Fastify layer. Its adapter app is Express only, so the Fastify starter is not exercised here. Tracked in feat: exercise the Fastify starter in the verify harness #147. The parity suite in seamless-auth-server asserts the two adapters return identical status, body, and Set-Cookie headers, including the console proxy, which is the current basis for confidence.
  • Verify builds the api and react layers from sibling working trees, not from the pinned refs. A checkout behind the tag will silently test the wrong source; the packages block in the summary reports the versions it actually used, which is the tell. The run above used clean v0.7.0 and v0.8.0 checkouts via SEAMLESS_API_DIR and SEAMLESS_TEMPLATES_DIR.

Bccorb added 2 commits July 30, 2026 12:29
Bump the pinned auth API to v0.6.0, the admin dashboard to v0.4.0, and the
templates ref to v0.6.0, which carries @seamless-auth/react ^0.7.0 in both
React starters and @seamless-auth/express ^0.11.0 in the Express starter.

The API drops the admin bootstrap invite flow in favor of the OWNER_EMAIL
grant the CLI already writes, adds admin:read and admin:write to
AVAILABLE_ROLES, and gains DB_SSL configuration. Those reach generated
projects without code changes: the CLI fetches .env.example at the pinned
tag and mutates it.

Move the conformance adapter to @seamless-auth/express ^0.11.0. Its
breaking change splits error into errorCode and errorBody on the handler
result types, which only affects code importing handlers from
@seamless-auth/core directly, so the adapter needed no source change.
Bump the templates ref to v0.7.0, which adds a Fastify API starter beside
Express. The backend prompt renders it as "Fastify (beta)" from the
registry status, so no CLI code changes are needed.

The starter serves the same surface as Express on the same env contract,
including the admin console at /console behind SERVE_ADMIN_CONSOLE, which
the Fastify adapter gained in @seamless-auth/fastify 0.2.0. Both API
starters now ship .env.example secrets long enough to clear the adapter's
32 character minimum.
@Bccorb Bccorb changed the title chore: move the scaffold onto the v0.6.0 ecosystem chore: move the scaffold onto the current ecosystem and offer Fastify Jul 30, 2026
The auth API adds an unauthenticated GET /system-config/public returning the
configured login methods. The adapters proxy it, and the React starters read
it to offer a skip on the passkey registration screen when the instance has
another login method enabled. The API, adapters, and templates have to move
together for that path to work, so bump them as a set.

Templates v0.8.0 carries @seamless-auth/react ^0.8.0, @seamless-auth/express
^0.12.0, and @seamless-auth/fastify ^0.3.0, plus two Fastify boot fixes: an
empty PORT= now falls back to 3000 instead of binding a random free port, and
pino-pretty moves to a runtime dependency.

Move the conformance adapter to @seamless-auth/express ^0.12.0, the release
that proxies the new route.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant