Can start Matrix authentication from UI

This commit is contained in:
2025-11-05 18:27:41 +01:00
parent 3dab9f41d2
commit 37fad9ff55
12 changed files with 195 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ export interface UserInfo {
time_update: number;
name: string;
email: string;
matrix_user_id?: string;
}
const TokenStateKey = "auth-state";

View File

@@ -0,0 +1,15 @@
import { APIClient } from "./ApiClient";
export class MatrixLinkApi {
/**
* Start Matrix Account login
*/
static async StartAuth(): Promise<{ url: string }> {
return (
await APIClient.exec({
uri: "/matrix_link/start_auth",
method: "POST",
})
).data;
}
}