From bbeab4da65c245cb6083554a44fa12293902424d Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 1 May 2021 13:54:12 +0200 Subject: :art: added optional captcha to login route --- src/util/Captcha.ts | 1 - src/util/Config.ts | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 src/util/Captcha.ts (limited to 'src/util') diff --git a/src/util/Captcha.ts b/src/util/Captcha.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/util/Captcha.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/util/Config.ts b/src/util/Config.ts index e500197f..f1f0f458 100644 --- a/src/util/Config.ts +++ b/src/util/Config.ts @@ -1,6 +1,5 @@ import { Config, Snowflake } from "@fosscord/server-util"; import crypto from "crypto"; -import fs from "fs"; export default { init() { @@ -75,10 +74,14 @@ export interface DefaultOptions { forwadedFor: string | null; captcha: { enabled: boolean; - service: "recaptcha" | null; // TODO: hcaptcha, custom + service: "recaptcha" | "hcaptcha" | null; // TODO: hcaptcha, custom sitekey: string | null; + secret: string | null; }; }; + login: { + requireCaptcha: boolean; + }; register: { email: { required: boolean; @@ -155,8 +158,12 @@ export const DefaultOptions: DefaultOptions = { enabled: false, service: null, sitekey: null, + secret: null, }, }, + login: { + requireCaptcha: false, + }, register: { email: { required: true, -- cgit 1.5.1