Files
trailbase/crates/auth-ui
Sebastian Jeltsch 9e46a099d0 Stop encoding SQL values as generic JSON values (outside the context of the record API), i.e. for admin APIs and between WASM host/guest.
This lets us simplify the parsing and add back a lot of type-safety (including int64). As a side-effect, we basically had to complete reqrite the record insert/update handling in the admin UI.

Note, however, that this is a breaking change, since it touches serialization between WASM guests and host. Guest will need to be built against an updated guest runtime.
2025-10-21 16:40:45 +02:00
..
2025-09-24 12:27:56 +02:00
2025-10-13 15:45:54 +02:00

TrailBase Auth UI WASM Component

The default Auth UI that is (used to be) built into TrailBase as a separate WASM component.

Building your own Auth UIs was always an option, both client side and server-side. Unbundling the Auth UI,

  • Makes it easier to customize and build your own.
  • Demonstrates the composability of WASM components along others as sort of an early-day plugin system.
  • You don't pay the cost if you don't use it.

Implementation Details

This crate mostly uses plain HTML forms and server-side rendering (the user's profile page uses JavaScript) to allow even no-script users to sign in. Astro is used in SSG-mode to generate the templates, which are then rendered by the Rust WASM component using the askama crate.