feat(auth): offer manual signin

This commit is contained in:
DecDuck
2024-12-27 13:07:10 +11:00
parent 981b1169ee
commit 9b7192a8cc
3 changed files with 67 additions and 11 deletions
+7 -4
View File
@@ -1,7 +1,4 @@
use std::{
env,
sync::Mutex,
};
use std::{env, sync::Mutex};
use chrono::Utc;
use log::{info, warn};
@@ -138,6 +135,12 @@ fn recieve_handshake_logic(app: &AppHandle, path: String) -> Result<(), RemoteAc
Ok(())
}
#[tauri::command]
pub fn manual_recieve_handshake(app: AppHandle, token: String) -> Result<(), String> {
recieve_handshake(app, format!("handshake/{}", token));
Ok(())
}
pub fn recieve_handshake(app: AppHandle, path: String) {
// Tell the app we're processing
app.emit("auth/processing", ()).unwrap();