2025-08-11 22:31:51 +07:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
|
|
|
pub struct GoogleUser {
|
|
|
|
|
pub id: String,
|
|
|
|
|
pub email: String,
|
2025-08-12 16:11:15 +07:00
|
|
|
#[serde(default)]
|
2025-08-11 22:31:51 +07:00
|
|
|
pub verified_email: bool,
|
2025-08-12 16:11:15 +07:00
|
|
|
pub name: Option<String>,
|
|
|
|
|
pub given_name: Option<String>,
|
|
|
|
|
pub family_name: Option<String>,
|
|
|
|
|
pub picture: Option<String>,
|
|
|
|
|
pub locale: Option<String>,
|
2025-08-11 22:31:51 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
|
|
|
pub struct GoogleTokenResponse {
|
|
|
|
|
pub access_token: String,
|
|
|
|
|
pub expires_in: u64,
|
|
|
|
|
pub refresh_token: Option<String>,
|
|
|
|
|
pub scope: String,
|
|
|
|
|
pub token_type: String,
|
|
|
|
|
pub id_token: String,
|
|
|
|
|
}
|