diff --git a/slowcord/login/public/css/index.css b/slowcord/login/public/css/index.css index 1fa76966..d4f5a4b4 100644 --- a/slowcord/login/public/css/index.css +++ b/slowcord/login/public/css/index.css @@ -103,4 +103,10 @@ label { margin-top: 10px; color: rgb(200, 20, 20); display: none; +} + +.h-captcha { + display: flex; + justify-content: center; + margin-top: 10px; } \ No newline at end of file diff --git a/slowcord/login/public/login.html b/slowcord/login/public/login.html index bbfbf2af..b2c1b229 100644 --- a/slowcord/login/public/login.html +++ b/slowcord/login/public/login.html @@ -41,6 +41,9 @@ href="https://discord.com/api/oauth2/authorize?client_id=991688571415175198&redirect_uri=https%3A%2F%2Fslowcord.maddy.k.vu%2Foauth%2Fdiscord&response_type=code&scope=identify%20email"> Login with Discord + +
+ @@ -67,11 +70,13 @@ const data = new FormData(e.target); const email = data.get("email"); const password = data.get("password"); + const hcaptcha = data.get("h-captcha-response"); await handleSubmit("/api/v9/auth/login", { login: email, password: password, - }) + captcha_key: hcaptcha, + }); }) diff --git a/slowcord/login/public/register.html b/slowcord/login/public/register.html index 9e7457a1..40eecdbe 100644 --- a/slowcord/login/public/register.html +++ b/slowcord/login/public/register.html @@ -47,6 +47,9 @@ href="https://discord.com/api/oauth2/authorize?client_id=991688571415175198&redirect_uri=https%3A%2F%2Fslowcord.maddy.k.vu%2Foauth%2Fdiscord&response_type=code&scope=identify%20email"> Login with Discord + +
+ @@ -58,6 +61,7 @@ const username = data.get("username"); const password = data.get("password"); const dob = data.get("dob"); + const hcaptcha = data.get("h-captcha-response") await handleSubmit("/api/v9/auth/register", { consent: true, @@ -65,6 +69,7 @@ username: username, password: password, date_of_birth: dob, + captcha_key: hcaptcha, }); })