Skip to content
Voidware-ProhibitedPublic

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

authenticated-dashboard

Teaches: provide_auth_context + init_auth_resource, RequireAuthenticated route gate, and theme mode / density toggles persisted to localStorage.

Topology: Embedded demo session (in-memory AuthSession). Swap the Sign in handler for your session server function in production.

Prerequisites

# cargo install cargo-leptos   # once
export LEPTOS_OUTPUT_NAME=authenticated-dashboard

Run

cargo leptos watch --split --project authenticated-dashboard

Open http://127.0.0.1:3031/:

  1. Visit /dashboard while signed out → auth-required gate.
  2. Sign in → reopen /dashboard → protected card.
  3. Toggle Dark / Compact → refresh → prefs restore.

Compile-check:

cargo check -p authenticated-dashboard --features ssr

Open first: src/app.rs → src/theme_prefs.rs

Success: gate blocks anonymous /dashboard; after Sign in the dashboard card renders; theme/density survive reload.

Next step: ../server-paged-analytics for server-paged DataTable + chart.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages