Can finalize Matrix authentication

This commit is contained in:
2025-11-05 19:32:11 +01:00
parent 37fad9ff55
commit 1eaec9d319
13 changed files with 180 additions and 18 deletions

View File

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

View File

@@ -12,4 +12,15 @@ export class MatrixLinkApi {
})
).data;
}
/**
* Finish Matrix Account login
*/
static async FinishAuth(code: string, state: string): Promise<void> {
await APIClient.exec({
uri: "/matrix_link/finish_auth",
method: "POST",
jsonData: { code, state },
});
}
}