rs_auth_core/oauth/
mod.rs1pub mod client;
2pub mod github;
3pub mod google;
4pub mod providers;
5
6use serde::{Deserialize, Serialize};
7
8#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct OAuthUserInfo {
11 pub provider_id: String,
12 pub account_id: String,
13 pub email: String,
14 pub name: Option<String>,
15 pub image: Option<String>,
16}
17
18#[derive(Debug, Clone)]
20pub struct OAuthProviderConfig {
21 pub provider_id: String,
22 pub client_id: String,
23 pub client_secret: String,
24 pub auth_url: String,
25 pub token_url: String,
26 pub userinfo_url: String,
27 pub scopes: Vec<String>,
28 pub redirect_url: String,
29}
30
31#[derive(Debug, Clone, Default)]
33pub struct OAuthTokens {
34 pub access_token: Option<String>,
35 pub refresh_token: Option<String>,
36 pub expires_in: Option<time::Duration>,
37 pub scope: Option<String>,
38}