another stage of client authentication

This commit is contained in:
DecDuck
2024-10-08 16:13:28 +11:00
parent 13bf4fe757
commit 8896492776
22 changed files with 802 additions and 83 deletions
+9 -2
View File
@@ -4,10 +4,10 @@ use std::{
};
use serde::{Deserialize, Serialize};
use tauri::Error;
use tauri::{App, AppHandle, Emitter, Error, EventLoopMessage, Wry};
use url::Url;
use crate::{data::DatabaseInterface, AppState, AppStatus, User, DB};
use crate::{AppStatus, User, DB};
#[derive(Serialize)]
struct InitiateRequestBody {
@@ -15,6 +15,13 @@ struct InitiateRequestBody {
platform: String,
}
pub async fn recieve_handshake(app: AppHandle, path: String) {
// Tell the app we're connecting
app.emit("auth/connecting", ()).unwrap();
// TODO
}
#[tauri::command]
pub async fn auth_initiate<'a>() -> Result<(), String> {
let base_url = {