feat: integrate Linux DO OAuth authentication

This commit is contained in:
seefs001
2024-11-10 23:56:22 +08:00
parent 3b53a2a5ce
commit 046f859d92
13 changed files with 978 additions and 542 deletions

View File

@@ -19,6 +19,14 @@ export async function onGitHubOAuthClicked(github_client_id) {
);
}
export async function onLinuxDOOAuthClicked(linuxdo_client_id) {
const state = await getOAuthState();
if (!state) return;
window.open(
`https://connect.linux.do/oauth2/authorize?response_type=code&client_id=${linuxdo_client_id}&state=${state}`,
);
}
let channelModels = undefined;
export async function loadChannelModels() {
const res = await API.get('/api/models');