santui-core 0.2.7

Santui core framework — App, Plugin trait, events, config, palette
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[derive(Clone, Debug)]
pub struct User {
    pub id: String,
    pub email: String,
    pub name: String,
    pub avatar_url: Option<String>,
    pub provider: String,
}

pub trait AuthHandle: Send + Sync {
    fn current_user(&self) -> Option<User>;
    fn bearer_token(&self) -> Option<String>;
    fn sign_in(&self, provider: &str) -> Result<User, Box<dyn std::error::Error>>;
    fn sign_out(&self);
}