mirror of
https://github.com/trailbaseio/trailbase.git
synced 2026-02-18 07:29:59 -06:00
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.
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.