another stage of client authentication
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user