yggdrasil/src/context.rs
xfy f5413e00cc fix(auth): prevent password_hash from reaching the frontend
Introduce PublicUser struct without password_hash field. The
get_current_user server function now returns PublicUser via
CurrentUserResponse, so Argon2 hashes are never serialized to WASM.

Internal server-side functions (get_current_admin_user) continue
using the full User struct.
2026-06-03 10:32:15 +08:00

11 lines
211 B
Rust

use dioxus::prelude::*;
use std::sync::Arc;
use crate::models::user::PublicUser;
#[derive(Clone, Copy)]
pub struct UserContext {
pub user: Signal<Option<Arc<PublicUser>>>,
pub checked: Signal<bool>,
}