use serde::{Deserialize, Serialize};

/// Authentication state returned by the `check_auth` server function.
///
/// When no valid session exists, `authenticated` is `false` and all
/// other fields are empty strings.
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
pub struct AuthInfo {
    pub authenticated: bool,
    pub sub: String,
    pub email: String,
    pub name: String,
    pub avatar_url: String,
}
