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.
11 lines
211 B
Rust
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>,
|
|
}
|