You've already forked AstralRinth
forked from didirus/AstralRinth
Add auth servers unreachable warning to app (#4774)
* Add auth servers unreachable warning to app * Check auth status every 5 minutes * Use admonition in auth server warning * feat: tanstack * Fix auth server reachability query * Format * intl extract --------- Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
This commit is contained in:
@@ -7,6 +7,7 @@ use theseus::prelude::*;
|
||||
pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
tauri::plugin::Builder::<R>::new("auth")
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
check_reachable,
|
||||
login,
|
||||
remove_user,
|
||||
get_default_user,
|
||||
@@ -16,6 +17,13 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
.build()
|
||||
}
|
||||
|
||||
/// Checks if the authentication servers are reachable.
|
||||
#[tauri::command]
|
||||
pub async fn check_reachable() -> Result<()> {
|
||||
minecraft_auth::check_reachable().await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Authenticate a user with Hydra - part 1
|
||||
/// This begins the authentication flow quasi-synchronously, returning a URL to visit (that the user will sign in at)
|
||||
#[tauri::command]
|
||||
|
||||
Reference in New Issue
Block a user