feat: hcaptcha

This commit is contained in:
Tony Yang
2025-04-15 14:46:16 +08:00
parent b8ae97e49b
commit 1b60b3517d
20 changed files with 430 additions and 247 deletions
+2 -2
View File
@@ -7,9 +7,9 @@ import { login } from '../lib/api';
const router = useRouter();
const authStore = useAuthStore();
const onSubmit = async ({ username, password }) => {
const onSubmit = async ({ username, password, hcaptchaResponse }) => {
try {
const response = await login(username, password);
const response = await login(username, password, hcaptchaResponse);
const { jwt } = response;
authStore.setJwt(jwt);
alert('Login successful!');