tauri_plugin_oauth_session/models.rs
1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4#[serde(rename_all = "camelCase")]
5pub struct AuthenticateOptions {
6 /// Fully-qualified URL of the OAuth authorization endpoint to load.
7 pub auth_url: String,
8 /// URL scheme the system should intercept (e.g. `eurora`). Must NOT
9 /// include `://`.
10 pub callback_scheme: String,
11 /// When `true`, the session uses an ephemeral cookie store with no
12 /// shared state with Safari. Defaults to `true`, which is the
13 /// privacy-respecting default for OAuth.
14 #[serde(default, skip_serializing_if = "Option::is_none")]
15 pub prefers_ephemeral_session: Option<bool>,
16}
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
19#[serde(rename_all = "camelCase")]
20pub struct AuthenticateResponse {
21 /// The redirect URL the system intercepted, with all query parameters
22 /// from the OAuth provider intact.
23 pub url: String,
24}