Background: Google blocks OAuth in embedded WebView (403 disallowed_useragent). Solution: open Google login in the Android system browser, then deep-link back to the Tauri app via custom scheme after callback. Changes: - Tauri: add tauri-plugin-opener + tauri-plugin-deep-link to Cargo.toml - Tauri: register plugins in lib.rs, add capabilities - Web: auth-form.tsx Google button uses openUrl() via @tauri-apps/plugin-opener on Tauri (opens in system browser), falls back to window.location.href - Web: add lib/tauri.ts for isTauri() detection + lazy opens - API: /auth/google accepts ?platform=tauri → encodes into OAuth state param - API: /auth/google/callback decodes state → if tauri, renders HTML page that deep-links back via zeavisedu:// scheme; if web, 302 redirect - Android: patch script adds deep link intent filter for zeavisedu:// scheme Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
498 B
TOML
19 lines
498 B
TOML
[package]
|
|
name = "zeavis-edu-tauri"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
name = "zeavis_edu_tauri"
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[dependencies]
|
|
tauri = { version = "2", default-features = false, features = ["wry", "common-controls-v6", "dynamic-acl", "x11", "dbus", "custom-protocol"] }
|
|
tauri-plugin-opener = "2"
|
|
tauri-plugin-deep-link = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|