Implement full discord OAuth api flow

This commit is contained in:
Dominic Ferrando
2026-08-16 01:51:12 -04:00
parent 8db1db2ec6
commit 17af2f3d1f
5 changed files with 70 additions and 41 deletions
+3 -5
View File
@@ -14,7 +14,7 @@
loading = true;
try {
const { status } = await api.auth.login.post({ password });
const { status } = await api.auth.admin.login.post({ password });
if (status === 401) {
error = "Invalid password";
@@ -22,11 +22,9 @@
}
await goto("/");
}
catch {
} catch {
error = "Unable to reach the server. Please try again.";
}
finally {
} finally {
loading = false;
}
}